mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 14:33:22 +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.
48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, makeWrapper, perl, perlPackages, libjpeg_original }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "jpegrescan";
|
|
version = "unstable-2019-03-27";
|
|
|
|
dontBuild = true;
|
|
dontConfigure = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "kud";
|
|
repo = pname;
|
|
rev = "3a7de06feabeb3c3235c3decbe2557893c1abe51";
|
|
sha256 = "0cnl46z28lkqc5x27b8rpghvagahivrqcfvhzcsv9w1qs8qbd6dm";
|
|
};
|
|
|
|
patchPhase = ''
|
|
patchShebangs jpegrescan
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/share/jpegrescan
|
|
mv README.md $out/share/jpegrescan/
|
|
mkdir $out/bin
|
|
mv jpegrescan $out/bin
|
|
chmod +x $out/bin/jpegrescan
|
|
|
|
wrapProgram $out/bin/jpegrescan \
|
|
--prefix PATH : "${libjpeg_original}/bin:" \
|
|
--prefix PERL5LIB : $PERL5LIB
|
|
'';
|
|
|
|
propagatedBuildInputs = [ perlPackages.FileSlurp ];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ perl ];
|
|
|
|
meta = with lib; {
|
|
description = "Losslessly shrink any JPEG file";
|
|
homepage = "https://github.com/kud/jpegrescan";
|
|
license = licenses.publicDomain;
|
|
maintainers = with maintainers; [ ramkromberg ];
|
|
platforms = platforms.all;
|
|
mainProgram = "jpegrescan";
|
|
};
|
|
}
|