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