Created
November 27, 2015 23:50
-
-
Save matejc/99deb0260038bac2869b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, fetchurl }: | |
stdenv.mkDerivation rec { | |
name = "your-program-${version}"; | |
version = "1.2.3"; | |
src = fetchurl { | |
url = "https://your-program.com/download/v${version}.tar.gz"; | |
sha256 = "05s3kvsz6pzh4.......lqwg0qn0ljz58sdqh"; | |
}; | |
phases = [ "installPhase" "fixupPhase" ]; | |
installPhase = '' | |
mkdir -p $out/bin | |
cp -r ./bin/* $out/bin | |
# and if needed: | |
patchelf \ | |
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ | |
--set-rpath "${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib" \ | |
$out/bin/your-program | |
''; | |
meta = with stdenv.lib; { | |
description = "A super your-program that does something"; | |
homepage = https://your-program.com/; | |
license = licenses.mit; | |
maintainers = [ maintainers.you ]; | |
platforms = platforms.linux; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment