diff options
Diffstat (limited to 'pkgs/sternenseemann/build-git-tarball')
-rw-r--r-- | pkgs/sternenseemann/build-git-tarball/default.nix | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/pkgs/sternenseemann/build-git-tarball/default.nix b/pkgs/sternenseemann/build-git-tarball/default.nix deleted file mode 100644 index 816ad9e2..00000000 --- a/pkgs/sternenseemann/build-git-tarball/default.nix +++ /dev/null @@ -1,41 +0,0 @@ -# Build a reproducible tar.gz from a git revision or tag -{ lib -, fetchgit -, runCommandNoCC -, gnutar -, gzip -, getBins -}: - -{ url -, sha256 -, pname -, subDir ? "" -, ... -}@args: - -assert lib.assertMsg (args ? rev || args ? tag) "Need either rev or tag"; - -let - bins = getBins gzip [ "gzip" ] - // getBins gnutar [ "tar" ] - ; - - shortRev = args.tag or args.rev; - realRev = - if args ? tag - then "refs/tags/${args.tag}" - else args.rev; - - source = fetchgit { - inherit url sha256; - rev = realRev; - }; - - basename = "${pname}-${shortRev}"; -in - -runCommandNoCC "${basename}.tar.gz" {} '' - cd ${source}${subDir} - ${bins.tar} -c ./ --transform 's/^\./${basename}/' | ${bins.gzip} > $out -'' |