summaryrefslogtreecommitdiffstats
path: root/flake.nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-04-03 20:06:26 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-04-03 20:06:26 +0200
commitbf70a047a0b2da606f65a88f13ce2994065cd9c4 (patch)
tree5082df4ddbaf9b1770a5c2f4fd55feb62eecc474 /flake.nix
parent6e7f252ea6568d4b151e4a7003cb4cffae26e493 (diff)
Publish a tarball containing the crates we depend on
This is needed since we no longer produce a source tarball.
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index be966f498..a8efd57e8 100644
--- a/flake.nix
+++ b/flake.nix
@@ -239,6 +239,20 @@
hydraJobs = {
+ nixVendoredCrates =
+ with nixpkgsFor.x86_64-linux;
+
+ runCommand "vendored-crates" {}
+ ''
+ mkdir -p $out/nix-support
+ name=nix-vendored-crates-${version}
+ fn=$out/$name.tar.xz
+ tar cvfJ $fn -C ${nixVendoredCrates} vendor \
+ --owner=0 --group=0 --mode=u+rw,uga+r \
+ --transform "s,vendor,$name,"
+ echo "file crates-tarball $fn" >> $out/nix-support/hydra-build-products
+ '';
+
# Binary package for various platforms.
build = nixpkgs.lib.genAttrs systems (system: nixpkgsFor.${system}.nix);