diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2017-10-30 22:30:14 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2017-10-30 22:30:14 +0100 |
commit | 687943763c57016b5fc96df14ea49c5f2ad3b7ef (patch) | |
tree | a73ce1d5a41d5f2cd8eee42f696e08989037c548 /pkgs/build-support | |
parent | 5d41dda02db3f538fb253056575c151192d4ce41 (diff) | |
parent | 9d74a615ce99da0516d31de25d96ac9c9cd7576e (diff) | |
download | nixlib-687943763c57016b5fc96df14ea49c5f2ad3b7ef.tar nixlib-687943763c57016b5fc96df14ea49c5f2ad3b7ef.tar.gz nixlib-687943763c57016b5fc96df14ea49c5f2ad3b7ef.tar.bz2 nixlib-687943763c57016b5fc96df14ea49c5f2ad3b7ef.tar.lz nixlib-687943763c57016b5fc96df14ea49c5f2ad3b7ef.tar.xz nixlib-687943763c57016b5fc96df14ea49c5f2ad3b7ef.tar.zst nixlib-687943763c57016b5fc96df14ea49c5f2ad3b7ef.zip |
Merge branch 'master' into staging
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/fetchadc/builder.sh | 7 | ||||
-rw-r--r-- | pkgs/build-support/fetchadc/default.nix | 36 | ||||
-rw-r--r-- | pkgs/build-support/fetchbower/default.nix | 6 | ||||
-rw-r--r-- | pkgs/build-support/fetchgitrevision/default.nix | 10 |
4 files changed, 3 insertions, 56 deletions
diff --git a/pkgs/build-support/fetchadc/builder.sh b/pkgs/build-support/fetchadc/builder.sh deleted file mode 100644 index ceeaa9213d65..000000000000 --- a/pkgs/build-support/fetchadc/builder.sh +++ /dev/null @@ -1,7 +0,0 @@ -source $stdenv/setup - -loginpage=`curl --insecure -s -L -b cookies.txt "$url"` - -[[ $loginpage =~ form[^\>]+action=\"([^\"]+)\" ]] && loginurl=${BASH_REMATCH[1]} - -curl --insecure -s --output "$out" -L -b cookies.txt --data "appleId=${adc_user}&accountPassword=${adc_pass}" "https://idmsa.apple.com/IDMSWebAuth/${loginurl}" diff --git a/pkgs/build-support/fetchadc/default.nix b/pkgs/build-support/fetchadc/default.nix deleted file mode 100644 index 4d759e6f7f18..000000000000 --- a/pkgs/build-support/fetchadc/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ stdenv, curl, adc_user, adc_pass }: - -{ # Path to fetch. - path - - # Hash of the downloaded file -, sha256 - -, # Additional curl options needed for the download to succeed. - curlOpts ? "" - -, # Name of the file. If empty, use the basename of `path'. - name ? "" -}: - -stdenv.mkDerivation { - url = "https://developer.apple.com/downloads/download.action?path=${path}"; - - name = if name != "" then name else baseNameOf path; - builder = ./builder.sh; - - buildInputs = [ curl ]; - - meta = { - # Password-guarded files from ADC are certainly unfree, as far as we're concerned! - license = stdenv.lib.licenses.unfree; - }; - - outputHashAlgo = "sha256"; - outputHash = sha256; - outputHashMode = "flat"; - - inherit curlOpts adc_user adc_pass; - - preferLocalBuild = true; -} diff --git a/pkgs/build-support/fetchbower/default.nix b/pkgs/build-support/fetchbower/default.nix index dd0bac49cb6d..3e1f0eff84af 100644 --- a/pkgs/build-support/fetchbower/default.nix +++ b/pkgs/build-support/fetchbower/default.nix @@ -4,13 +4,13 @@ let let components = lib.splitString "#" version; hash = lib.last components; - ver = if builtins.length components == 1 then version else hash; + ver = if builtins.length components == 1 then (cleanName version) else hash; in ver; - bowerName = name: lib.replaceStrings ["/"] ["-"] name; + cleanName = name: lib.replaceStrings ["/" ":"] ["-" "-"] name; fetchbower = name: version: target: outputHash: stdenv.mkDerivation { - name = "${bowerName name}-${bowerVersion version}"; + name = "${cleanName name}-${bowerVersion version}"; SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; buildCommand = '' fetch-bower --quiet --out=$PWD/out "${name}" "${target}" "${version}" diff --git a/pkgs/build-support/fetchgitrevision/default.nix b/pkgs/build-support/fetchgitrevision/default.nix deleted file mode 100644 index e877648978d9..000000000000 --- a/pkgs/build-support/fetchgitrevision/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -runCommand: git: repository: branch: - import (runCommand "head-revision" - { buildInputs = [ git ]; - dummy = builtins.currentTime; - } - '' - rev=$(git ls-remote ${repository} | grep "refs/${branch}$" | awk '{ print $1 }') - echo "[ \"$rev\" ]" > $out - echo Latest revision in ${branch} is $rev - '') |