nixpkgs/pkgs/by-name/li/libgourou/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

57 lines
1.4 KiB
Nix

{ lib
, stdenv
, fetchzip
, pugixml
, updfparser
, curl
, openssl
, libzip
, installShellFiles
}:
stdenv.mkDerivation rec {
pname = "libgourou";
version = "0.8.2";
src = fetchzip {
url = "https://indefero.soutade.fr/p/libgourou/source/download/v${version}/";
sha256 = "sha256-adkrvBCgN07Ir+J3JFCy+X9p9609lj1w8nElrlHXTxc";
extension = "zip";
};
postPatch = ''
patchShebangs scripts/setup.sh
'';
postConfigure = ''
mkdir lib
ln -s ${updfparser}/lib lib/updfparser
'';
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ pugixml updfparser curl openssl libzip ];
makeFlags = [ "BUILD_STATIC=1" "BUILD_SHARED=1" ];
installPhase = ''
runHook preInstall
install -Dt $out/include include/libgourou*.h
install -Dt $out/lib libgourou.so
install -Dt $out/lib libgourou.so.${version}
install -Dt $out/lib libgourou.a
install -Dt $out/bin utils/acsmdownloader
install -Dt $out/bin utils/adept_{activate,loan_mgt,remove}
installManPage utils/man/*.1
runHook postInstall
'';
meta = with lib; {
description = "Implementation of Adobe's ADEPT protocol for ePub/PDF DRM";
homepage = "https://indefero.soutade.fr/p/libgourou";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ autumnal ];
platforms = platforms.all;
broken = stdenv.hostPlatform.isDarwin;
};
}