diff options
author | William A. Kennington III <william@wkennington.com> | 2015-03-27 13:22:51 -0700 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2015-03-27 15:36:26 -0700 |
commit | 4631afc21e920485f597c812c866c237dd60c698 (patch) | |
tree | d4bfac530611129f58fc09b409f3f45dd2c0ac91 /pkgs/build-support | |
parent | 8fbc082d1f829b11a9448921ef5b2e58fbf85e70 (diff) | |
download | nixlib-4631afc21e920485f597c812c866c237dd60c698.tar nixlib-4631afc21e920485f597c812c866c237dd60c698.tar.gz nixlib-4631afc21e920485f597c812c866c237dd60c698.tar.bz2 nixlib-4631afc21e920485f597c812c866c237dd60c698.tar.lz nixlib-4631afc21e920485f597c812c866c237dd60c698.tar.xz nixlib-4631afc21e920485f597c812c866c237dd60c698.tar.zst nixlib-4631afc21e920485f597c812c866c237dd60c698.zip |
Support unraring source files
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/builder-defs/builder-defs.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/build-support/builder-defs/builder-defs.nix b/pkgs/build-support/builder-defs/builder-defs.nix index da5d22498523..42d8f35b076d 100644 --- a/pkgs/build-support/builder-defs/builder-defs.nix +++ b/pkgs/build-support/builder-defs/builder-defs.nix @@ -23,6 +23,7 @@ let inherit (builtins) head tail trace; in else if hasSuffixHack ".tar.Z" s then "tZ" else if hasSuffixHack ".tar.lzma" s then "tar.lzma" else if hasSuffixHack ".tar.xz" s then "tar.xz" + else if hasSuffixHack ".rar" s then "rar" else if (hasSuffixHack ".zip" s) || (hasSuffixHack ".ZIP" s) then "zip" else if hasSuffixHack "-cvs-export" s then "cvs-dir" else if hasSuffixHack "-git-export" s then "git-dir" @@ -213,6 +214,9 @@ let inherit (builtins) head tail trace; in " else if (archiveType s) == "tar.xz" then " xz -d -c <'${s}' | tar xv cd \"\$(xz -d -c <'${s}' | tar t | head -1 | sed -e 's@/.*@@' )\" + " else if (archiveType s) == "rar" then " + unrar x '${s}' + cd \"$(unrar lb '${s}' | tail -1 | sed -e 's@/.*@@' )\" " else if (archiveType s) == "zip" then " unzip '${s}' cd \"$( unzip -lqq '${s}' | tail -1 | |