mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
571c71e6f7
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.
46 lines
1.6 KiB
Nix
46 lines
1.6 KiB
Nix
{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, libpng, perl, perlPackages, makeWrapper }:
|
||
|
||
stdenv.mkDerivation rec {
|
||
pname = "icoutils";
|
||
version = "0.32.3";
|
||
|
||
src = fetchurl {
|
||
url = "mirror://savannah/icoutils/icoutils-${version}.tar.bz2";
|
||
sha256 = "1q66cksms4l62y0wizb8vfavhmf7kyfgcfkynil3n99s0hny1aqp";
|
||
};
|
||
|
||
patches = [
|
||
# Fixes a linker failure with newer versions of ld64 due to not supporting nested archives.
|
||
(fetchpatch {
|
||
url = "https://git.savannah.nongnu.org/cgit/icoutils.git/patch/?id=aa3572119bfe34484025f37dbbc4d5070f735908";
|
||
hash = "sha256-4YCI+SYT2bCBNegkpN5jcfi6gOeec65TmCABr98HHB4=";
|
||
})
|
||
];
|
||
|
||
nativeBuildInputs = [ autoreconfHook makeWrapper ];
|
||
buildInputs = [ libpng perl ];
|
||
propagatedBuildInputs = [ perlPackages.LWP ];
|
||
|
||
# Fixes build failures on Darwin. These should be defined in `TargetConditional.h`, but it’s failing anyway.
|
||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DTARGET_OS_IPHONE=0 -DTARGET_OS_EMBEDDED=0";
|
||
|
||
postPatch = ''
|
||
patchShebangs extresso/extresso
|
||
patchShebangs extresso/extresso.in
|
||
patchShebangs extresso/genresscript
|
||
patchShebangs extresso/genresscript.in
|
||
'';
|
||
|
||
preFixup = ''
|
||
wrapProgram $out/bin/extresso --prefix PERL5LIB : $PERL5LIB
|
||
wrapProgram $out/bin/genresscript --prefix PERL5LIB : $PERL5LIB
|
||
'';
|
||
|
||
meta = {
|
||
homepage = "https://www.nongnu.org/icoutils/";
|
||
description = "Set of programs to deal with Microsoft Windows(R) icon and cursor files";
|
||
license = lib.licenses.gpl3Plus;
|
||
platforms = with lib.platforms; linux ++ darwin;
|
||
};
|
||
}
|