Skip to content

Instantly share code, notes, and snippets.

@kalbasit
Created March 8, 2019 05:58
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 kalbasit/08391107d809bba8ed7ccae98b94d37e to your computer and use it in GitHub Desktop.
Save kalbasit/08391107d809bba8ed7ccae98b94d37e to your computer and use it in GitHub Desktop.
mkExternal =
{ name, revision, src, patches }:
stdenvNoCC.mkDerivation {
inherit src patches;
name = "${name}-${revision}";
preferLocalBuild = true;
buildPhase = ''
echo -n "${revision}" > .git-revision
'';
installPhase = ''
cp -r . $out
'';
fixupPhase = ":";
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment