nixpkgs/pkgs/by-name/pi/pixeluvo/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

59 lines
1.3 KiB
Nix

{ lib, stdenv, fetchurl, dpkg, autoPatchelfHook, makeWrapper
, gtk3-x11 }:
stdenv.mkDerivation rec {
pname = "pixeluvo";
version = "1.6.0-2";
src = fetchurl {
url = "http://www.pixeluvo.com/downloads/${pname}_${version}_amd64.deb";
sha256 = "sha256-QYSuD6o3kHg0DrFihYEcf9e3b8U1bu4Zf78+Akmm8yo=";
};
nativeBuildInputs = [
dpkg
makeWrapper
autoPatchelfHook
];
buildInputs = [
gtk3-x11
stdenv.cc.cc
];
libPath = lib.makeLibraryPath buildInputs;
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
dpkg-deb -x ${src} ./
'';
installPhase = ''
runHook preInstall
mv usr $out
mv opt $out
install -Dm644 $out/opt/pixeluvo/pixeluvo.png -t $out/share/pixmaps/
substituteInPlace $out/share/applications/pixeluvo.desktop \
--replace '/opt/pixeluvo/pixeluvo.png' pixeluvo
makeWrapper $out/opt/pixeluvo/bin/Pixeluvo64 $out/bin/pixeluvo \
--prefix LD_LIBRARY_PATH : ${libPath}
runHook postInstall
'';
meta = with lib; {
description = "Beautifully Designed Image and Photo Editor for Windows and Linux";
homepage = "http://www.pixeluvo.com/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = [ ];
mainProgram = "pixeluvo";
};
}