Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bin builds #11

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,25 @@ let
echo " > repl"
'';
};

nodejs-headers-installer =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a few lines here about how this is meant to be used? i.e. "make sure your $HOME is set and call this executable".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I was thinking of adding a $HOME check in the script itself instead.

with pkgs;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's just use pkgs.writeScript, pkgs.nodejs, etc

writeScript "nodejs-headers-installer" ''
echo "* Installing nodejs headers in $HOME/.node-gyp/${nodejs.version} ..."
mkdir -p $HOME/.node-gyp/${nodejs.version}
echo 9 > $HOME/.node-gyp/${nodejs.version}/installVersion
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the 9?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember. This code has been cargo-culted heavily :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ln -sv ${nodejs}/include $HOME/.node-gyp/${nodejs.version}/include
'';
in
{
inherit
buildPackage
napalm-registry-devshell
nodejs-headers-installer
snapshotFromPackageLockJson
;


napalm-registry = haskellPackages.napalm-registry;

hello-world = pkgs.runCommand "hello-world-test" {}
Expand Down