fix: pre-fetch swagger-ui assets for Nix sandbox build
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
let
|
||||
swaggerUi = pkgs.fetchurl {
|
||||
url = "https://github.com/swagger-api/swagger-ui/archive/refs/tags/v5.17.14.zip";
|
||||
hash = "sha256-SBJE0IEgl7Efuu73n3HZQrFxYX+cn5UU5jrL4T5xzNw=";
|
||||
};
|
||||
in
|
||||
pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "imphnen-backend";
|
||||
version = (pkgs.lib.importTOML ./imphnen-backend/Cargo.toml).package.version;
|
||||
@@ -12,5 +18,8 @@ pkgs.rustPlatform.buildRustPackage {
|
||||
];
|
||||
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||
buildInputs = [ pkgs.openssl ];
|
||||
preBuild = ''
|
||||
export SWAGGER_UI_DOWNLOAD_URL="file://${swaggerUi}"
|
||||
'';
|
||||
doCheck = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user