Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, callPackage 4, fetchgit 5, libplist 6, libxml2 7, openssl 8, CoreFoundation 9, Security 10}: 11 12stdenv.mkDerivation rec { 13 pname = "ldid"; 14 version = "2.1.5"; 15 16 src = fetchgit { 17 url = "git://git.saurik.com/ldid.git"; 18 rev = "v${version}"; 19 sha256 = "sha256-RM5pU3mrgyvwNfWKNvCT3UYVGKtVhD7ifgp8fq9xXiM="; 20 }; 21 22 strictDeps = true; 23 24 buildInputs = [ 25 libplist 26 libxml2 27 openssl 28 ] ++ lib.optionals stdenv.isDarwin [ 29 CoreFoundation 30 Security 31 ]; 32 33 NIX_LDFLAGS = [ 34 "-lcrypto" 35 "-lplist-2.0" 36 "-lxml2" 37 ] ++ lib.optionals stdenv.isDarwin [ 38 "-framework CoreFoundation" 39 "-framework Security" 40 ]; 41 42 buildPhase = '' 43 runHook preBuild 44 45 cc -c -o lookup2.o lookup2.c -I. 46 c++ -std=c++11 -o ldid lookup2.o ldid.cpp -I. ${toString NIX_LDFLAGS} 47 48 runHook postBuild 49 ''; 50 51 installPhase = '' 52 runHook preInstall 53 54 install -Dm755 {,$out/bin/}ldid 55 ln -s $out/bin/ldid $out/bin/ldid2 56 57 runHook postInstall 58 ''; 59 60 meta = with lib; { 61 description = "Link Identity Editor"; 62 homepage = "https://cydia.saurik.com/info/ldid/"; 63 maintainers = with maintainers; [ wegank ]; 64 platforms = platforms.unix; 65 license = licenses.agpl3Only; 66 }; 67}