mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 07:32:58 +00:00
bower2nix: 2.1.0 -> 3.0.1
1. Update bower2nix version and add new/updated dependencies into node-packages-generated.nix. This was done manually, with npm2nix generating the initial set of derivations. In future, it would be nice to have an automatic process (see #10358, #9332). 2. Add an override to nodePackages.bower2nix wrapping the commands so that git is on the PATH. 3. Update fetchbower to support new command-line options of bower2nix, and to allow github URL tag versions.
This commit is contained in:
parent
156b05ae48
commit
457eddd18f
@ -1,11 +1,26 @@
|
||||
{ stdenv, fetch-bower, git }: name: version: target: outputHash: stdenv.mkDerivation {
|
||||
name = "${name}-${version}";
|
||||
buildCommand = ''
|
||||
out=$PWD/out fetch-bower "${name}" "${version}" "${target}"
|
||||
cp -R out $out
|
||||
'';
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
inherit outputHash;
|
||||
buildInputs = [git fetch-bower];
|
||||
}
|
||||
{ stdenv, lib, bower2nix }:
|
||||
let
|
||||
bowerVersion = version:
|
||||
let
|
||||
components = lib.splitString "#" version;
|
||||
hash = lib.last components;
|
||||
ver = if builtins.length components == 1 then version else hash;
|
||||
in ver;
|
||||
|
||||
fetchbower = name: version: target: outputHash: stdenv.mkDerivation {
|
||||
name = "${name}-${bowerVersion version}";
|
||||
buildCommand = ''
|
||||
fetch-bower --quiet --out=$PWD/out "${name}" "${target}" "${version}"
|
||||
# In some cases, the result of fetchBower is different depending
|
||||
# on the output directory (e.g. if the bower package contains
|
||||
# symlinks). So use a local output directory before copying to
|
||||
# $out.
|
||||
cp -R out $out
|
||||
'';
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
inherit outputHash;
|
||||
buildInputs = [ bower2nix ];
|
||||
};
|
||||
|
||||
in fetchbower
|
||||
|
@ -171,7 +171,7 @@ in
|
||||
};
|
||||
|
||||
fetchbower = callPackage ../build-support/fetchbower {
|
||||
inherit (nodePackages) fetch-bower;
|
||||
inherit (nodePackages) bower2nix;
|
||||
};
|
||||
|
||||
fetchbzr = callPackage ../build-support/fetchbzr { };
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -122,7 +122,6 @@
|
||||
, "git-run"
|
||||
, "bower"
|
||||
, "bower2nix"
|
||||
, "fetch-bower"
|
||||
, "npm-check-updates"
|
||||
, "node-stringprep"
|
||||
, "ltx"
|
||||
|
@ -63,6 +63,12 @@ in rec {
|
||||
sha1 = "26220f7e43ee3c0d714860db61c4d0ecc9bb3d89";
|
||||
}} ../webdrvr/chromedriver_linux64.zip
|
||||
'';
|
||||
bower2nix.buildInputs = [ pkgs.makeWrapper ];
|
||||
bower2nix.postInstall = ''
|
||||
for prog in bower2nix fetch-bower; do
|
||||
wrapProgram "$out/bin/$prog" --prefix PATH : "${pkgs.git}/bin"
|
||||
done
|
||||
'';
|
||||
} // args.overrides or {};
|
||||
|
||||
# Apply overrides and back compatiblity transformations
|
||||
|
Loading…
Reference in New Issue
Block a user