Skip to content

Instantly share code, notes, and snippets.

@ixxie
Created April 16, 2017 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ixxie/757382258cad049be23eff116d635108 to your computer and use it in GitHub Desktop.
Save ixxie/757382258cad049be23eff116d635108 to your computer and use it in GitHub Desktop.
Nix Command Line Tool
{ pkgs, stdenv}:
# flux
# bin/
# flux.sh
# lib/
# subcom1
# subcom2
# ...
# flux.nix
# default.nix
let
version = "0.0.1";
in stdenv.mkDerivation
{
name = "flux-${version}";
src = ./.;
phases = [ "installPhase" ];
installPhase =
''
mkdir -p $out/
cp -r ./* $out/.
substituteAllInPlace $out/bin/flux.sh
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment