Skip to content

Instantly share code, notes, and snippets.

@tilpner
Created March 18, 2019 19:52
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 tilpner/a147898791e77be4489c3d2c9c558b2b to your computer and use it in GitHub Desktop.
Save tilpner/a147898791e77be4489c3d2c9c558b2b to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "pkgname";
version = "0.1";
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "133s7c6kmjc5mpnacx5dssx8mix61wn767hh0nydwaaxpar2m3zj"; # 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