Skip to content

Instantly share code, notes, and snippets.

@nagisa
Last active March 18, 2019 19:32
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 nagisa/aa95307736efaa5c490af7719b7a94e9 to your computer and use it in GitHub Desktop.
Save nagisa/aa95307736efaa5c490af7719b7a94e9 to your computer and use it in GitHub Desktop.
{ stdenv, lib, fetchurl}: stdenv.mkDerivation rec {
name = "pkgname";
version = "0.1";
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "0v6a8x9hs9nyn3xih4fm6pp1s3si5vn9fkbb2817gcbmjln9zdz8"; # dummy, trying to obtain the real value by building the derivation
phases = ["installPhase"];
src = /directory;
files = [
"file1"
"file2"
];
installPhase = lib.concatMapStrings (file: ''
install -Dm755 "$src/$file" "$out/$file"
'') files;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment