ldid: refactor (#381751)
This commit is contained in:
commit
cfeb1c1ac4
59
pkgs/by-name/ld/ldid/package.nix
Normal file
59
pkgs/by-name/ld/ldid/package.nix
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchgit,
|
||||||
|
libplist,
|
||||||
|
libxml2,
|
||||||
|
openssl,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "ldid";
|
||||||
|
version = "2.1.5";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = "git://git.saurik.com/ldid.git";
|
||||||
|
rev = "v${finalAttrs.version}";
|
||||||
|
hash = "sha256-RM5pU3mrgyvwNfWKNvCT3UYVGKtVhD7ifgp8fq9xXiM=";
|
||||||
|
};
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
libplist
|
||||||
|
libxml2
|
||||||
|
openssl
|
||||||
|
];
|
||||||
|
|
||||||
|
env.NIX_LDFLAGS = toString ([
|
||||||
|
"-lcrypto"
|
||||||
|
"-lplist-2.0"
|
||||||
|
]);
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
|
cc -c -o lookup2.o lookup2.c -I.
|
||||||
|
c++ -std=c++11 -o ldid lookup2.o ldid.cpp -I.
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
install -Dm755 {,$out/bin/}ldid
|
||||||
|
ln -s $out/bin/ldid $out/bin/ldid2
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Link Identity Editor";
|
||||||
|
homepage = "https://cydia.saurik.com/info/ldid/";
|
||||||
|
license = lib.licenses.agpl3Only;
|
||||||
|
mainProgram = "ldid";
|
||||||
|
maintainers = with lib.maintainers; [ wegank ];
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
|
};
|
||||||
|
})
|
@ -1,71 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
stdenv,
|
|
||||||
fetchgit,
|
|
||||||
libplist,
|
|
||||||
libxml2,
|
|
||||||
openssl,
|
|
||||||
CoreFoundation,
|
|
||||||
Security,
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "ldid";
|
|
||||||
version = "2.1.5";
|
|
||||||
|
|
||||||
src = fetchgit {
|
|
||||||
url = "git://git.saurik.com/ldid.git";
|
|
||||||
rev = "v${version}";
|
|
||||||
hash = "sha256-RM5pU3mrgyvwNfWKNvCT3UYVGKtVhD7ifgp8fq9xXiM=";
|
|
||||||
};
|
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
buildInputs =
|
|
||||||
[
|
|
||||||
libplist
|
|
||||||
libxml2
|
|
||||||
openssl
|
|
||||||
]
|
|
||||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
||||||
CoreFoundation
|
|
||||||
Security
|
|
||||||
];
|
|
||||||
|
|
||||||
NIX_LDFLAGS =
|
|
||||||
[
|
|
||||||
"-lcrypto"
|
|
||||||
"-lplist-2.0"
|
|
||||||
"-lxml2"
|
|
||||||
]
|
|
||||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
||||||
"-framework CoreFoundation"
|
|
||||||
"-framework Security"
|
|
||||||
];
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
runHook preBuild
|
|
||||||
|
|
||||||
cc -c -o lookup2.o lookup2.c -I.
|
|
||||||
c++ -std=c++11 -o ldid lookup2.o ldid.cpp -I. ${toString NIX_LDFLAGS}
|
|
||||||
|
|
||||||
runHook postBuild
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
install -Dm755 {,$out/bin/}ldid
|
|
||||||
ln -s $out/bin/ldid $out/bin/ldid2
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Link Identity Editor";
|
|
||||||
homepage = "https://cydia.saurik.com/info/ldid/";
|
|
||||||
maintainers = with maintainers; [ wegank ];
|
|
||||||
platforms = platforms.unix;
|
|
||||||
license = licenses.agpl3Only;
|
|
||||||
};
|
|
||||||
}
|
|
@ -18289,10 +18289,6 @@ with pkgs;
|
|||||||
wlroots = wlroots_0_17;
|
wlroots = wlroots_0_17;
|
||||||
};
|
};
|
||||||
|
|
||||||
ldid = callPackage ../development/tools/ldid {
|
|
||||||
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
|
|
||||||
};
|
|
||||||
|
|
||||||
zrythm = callPackage ../applications/audio/zrythm {
|
zrythm = callPackage ../applications/audio/zrythm {
|
||||||
inherit (plasma5Packages) breeze-icons;
|
inherit (plasma5Packages) breeze-icons;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user