Skip to content

Commit 3ea3466

Browse files
authored
Restore broken Nix build (#311)
1 parent 522b47a commit 3ea3466

File tree

2 files changed

+14
-23
lines changed

2 files changed

+14
-23
lines changed

default.nix

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,11 @@
2424
};
2525
utoipa-swagger-ui = attrs: rec {
2626
# utoipa-swagger-ui tries to redownload swagger-ui, which is blocked by Nix's sandboxing
27-
# so we download it instead, and put it where it expects to be cached
28-
preConfigure =
29-
let
30-
swaggerUi = pkgs.fetchurl {
31-
url = "https://github.com/swagger-api/swagger-ui/archive/refs/tags/v5.17.3.zip";
32-
hash = "sha256-zrb8feuuDzt/g6y7Tucfh+Y2BWZov0soyNPR5LBqKx4=";
33-
};
34-
in ''
35-
mkdir -p target/build/utoipa-swagger-ui.out
36-
ln -s "${swaggerUi}" target/build/utoipa-swagger-ui.out/swagger-ui.zip
37-
'';
38-
# Build script only supports fetching from HTTP, not file URLs
39-
# Last path element decides the cache key, which we rely on above
40-
SWAGGER_UI_DOWNLOAD_URL = "file:///invalid-path/swagger-ui.zip";
27+
# so we download it instead, and tell it to use that
28+
SWAGGER_UI_DOWNLOAD_URL = "file://${pkgs.fetchurl {
29+
url = "https://github.com/swagger-api/swagger-ui/archive/refs/tags/v5.17.3.zip";
30+
hash = "sha256-zrb8feuuDzt/g6y7Tucfh+Y2BWZov0soyNPR5LBqKx4=";
31+
}}";
4132
};
4233
};
4334
}

nix/sources.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)