Skip to content

Instantly share code, notes, and snippets.

@infinisil
Created June 30, 2017 01:07
Show Gist options
  • Select an option

  • Save infinisil/0eb29a642e60aa40fe3439a8ffdfbf3f to your computer and use it in GitHub Desktop.

Select an option

Save infinisil/0eb29a642e60aa40fe3439a8ffdfbf3f to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
let
cs50 = stdenv.mkDerivation {
name = "test";
src = fetchFromGitHub {
owner = "cs50";
repo = "libcs50";
rev = "v8.0.3";
sha256 = "08fj1ckbv6q8fsyv3x17y73sfnk0x4b3dlfl35637srn36zfk28n";
};
buildInputs = [
asciidoctor
];
buildPhase = ''
make build
make hack
'';
installPhase = ''
make install DESTDIR=$out
'';
};
in
stdenv.mkDerivation {
name = "mything";
src = ./.;
buildInputs = [ cs50 ];
buildPhase = ''
echo blabla, calling make, whatever
'';
installPhase = ''
echo installing files, blablabla
touch $out
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment