nixpkgs/pkgs/by-name/pn/pngtoico/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

33 lines
912 B
Nix

{ lib, stdenv, fetchurl, libpng, fetchpatch }:
stdenv.mkDerivation rec {
pname = "pngtoico";
version = "1.0";
src = fetchurl {
url = "mirror://kernel/software/graphics/pngtoico/pngtoico-${version}.tar.gz";
sha256 = "1xb4aa57sjvgqfp01br3dm72hf7q0gb2ad144s1ifrs09215fgph";
};
patches = [
(fetchpatch {
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-gfx/pngtoico/files/pngtoico-1.0.1-libpng15.patch";
hash = "sha256-MeRV4FL37Wq7aFRnjbxPokcBKmPM+h94cnFJmdvHAt0=";
})
];
configurePhase = ''
sed -i s,/usr/local,$out, Makefile
'';
buildInputs = [ libpng ];
meta = {
homepage = "https://www.kernel.org/pub/software/graphics/pngtoico/";
description = "Small utility to convert a set of PNG images to Microsoft ICO format";
license = lib.licenses.gpl2Plus;
platforms = with lib.platforms; linux;
mainProgram = "pngtoico";
};
}