Skip to content

Commit

Permalink
bower2nix: init at 3.2.0-unstable-2024-06-25 (#336932)
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlambda authored Oct 1, 2024
2 parents c1d784a + 46bb7c8 commit cd94a35
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 148 deletions.
2 changes: 1 addition & 1 deletion doc/languages-frameworks/bower.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The end result of running Bower is a `bower_components` directory which can be included in the web app's build process.

Bower can be run interactively, by installing `nodePackages.bower`. More interestingly, the Bower components can be declared in a Nix derivation, with the help of `nodePackages.bower2nix`.
Bower can be run interactively, by installing `nodePackages.bower`. More interestingly, the Bower components can be declared in a Nix derivation, with the help of `bower2nix`.

## bower2nix usage {#ssec-bower2nix-usage}

Expand Down
44 changes: 44 additions & 0 deletions pkgs/by-name/bo/bower2nix/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
buildNpmPackage,
fetchFromGitHub,
git,
lib,
nix,
unstableGitUpdater,
}:

buildNpmPackage rec {
pname = "bower2nix";
version = "3.2.0-unstable-2024-06-25";

src = fetchFromGitHub {
owner = "rvl";
repo = "bower2nix";
rev = "b5da44f055c7561ed7a46226b3be0070e07d80e6";
hash = "sha256-da+m2UWQ83tW1o0P1qvw35KpsXL/BDTeShg4KxL+7Ck=";
};

npmDepsHash = "sha256-TK1sqF2J/hQuP3bgGA4MolLA7LWWuYNnqf4gDyU154k=";

npmBuildScript = "prepare";

makeWrapperArgs = [
"--prefix PATH : ${
lib.makeBinPath [
git
nix
]
}"
];

passthru.updateScript = unstableGitUpdater { tagPrefix = "v"; };

meta = {
changelog = "https://github.com/rvl/bower2nix/releases/tag/v${version}";
description = "Generate nix expressions to fetch bower dependencies";
homepage = "https://github.com/rvl/bower2nix";
license = lib.licenses.gpl3Only;
mainProgram = "bower2nix";
maintainers = [ ];
};
}
1 change: 1 addition & 0 deletions pkgs/development/node-packages/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ mapAliases {
inherit (pkgs) bash-language-server; # added 2024-06-07
bibtex-tidy = pkgs.bibtex-tidy; # added 2023-07-30
bitwarden-cli = pkgs.bitwarden-cli; # added 2023-07-25
inherit (pkgs) bower2nix; # added 2024-08-23
inherit (pkgs) btc-rpc-explorer; # added 2023-08-17
inherit (pkgs) carbon-now-cli; # added 2023-08-17
inherit (pkgs) carto; # added 2023-08-17
Expand Down
1 change: 0 additions & 1 deletion pkgs/development/node-packages/node-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
, "aws-cdk"
, "awesome-lint"
, "bower"
, "bower2nix"
, "browserify"
, "browser-sync"
, "cdk8s-cli"
Expand Down
134 changes: 0 additions & 134 deletions pkgs/development/node-packages/node-packages.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions pkgs/development/node-packages/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@ final: prev: {
buildInputs = [ final.node-gyp-build ];
};

bower2nix = prev.bower2nix.override {
nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ];
postInstall = ''
for prog in bower2nix fetch-bower; do
wrapProgram "$out/bin/$prog" --prefix PATH : ${lib.makeBinPath [ pkgs.git pkgs.nix ]}
done
'';
};

expo-cli = prev."expo-cli".override (oldAttrs: {
# The traveling-fastlane-darwin optional dependency aborts build on Linux.
dependencies = builtins.filter (d: d.packageName != "@expo/traveling-fastlane-${if stdenv.hostPlatform.isLinux then "darwin" else "linux"}") oldAttrs.dependencies;
Expand Down
4 changes: 1 addition & 3 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -906,9 +906,7 @@ with pkgs;

fet-sh = callPackage ../tools/misc/fet-sh { };

fetchbower = callPackage ../build-support/fetchbower {
inherit (nodePackages) bower2nix;
};
fetchbower = callPackage ../build-support/fetchbower { };

fetchbzr = callPackage ../build-support/fetchbzr { };

Expand Down

0 comments on commit cd94a35

Please sign in to comment.