Created
June 22, 2016 13:23
-
-
Save manveru/20d22586d9dceae90930be528cbc49ce to your computer and use it in GitHub Desktop.
use it like $(nix-build npm2nix.nix)/bin/npm2nix -i package.json -d -5 -c npm.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with (import <nixpkgs> {}); | |
let | |
npm2nixRepo = fetchFromGitHub { | |
owner = "svanderburg"; | |
repo = "npm2nix"; | |
rev = "758b286acfb077051a17aa9579adc558deeebbd4"; | |
sha256 = "0gmvpxvp75fqw7w7x0c1ywc1zghd1hl6iimbv4xnjwlxgh704yg6"; | |
}; | |
npm2nixOut = (import "${npm2nixRepo}/release.nix" {}).package."${builtins.currentSystem}".outPath; | |
in stdenv.mkDerivation { | |
name = "npm2nix"; | |
buildInputs = []; | |
src = npm2nixRepo; | |
phases = "buildPhase"; | |
buildPhase = '' | |
mkdir -p $out/bin | |
ln -s ${npm2nixOut}/bin/npm2nix $out/bin/npm2nix | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this expression used to install npm2nix?
What you can also do for convenience is creating a git clone:
Opening the git folder:
cd npm2nix
And running the following command-line instruction to install it: