Merge pull request #69273 from marsam/init-xprite-editor

xprite-editor: init at 2019-09-22
This commit is contained in:
Mario Rodas 2019-09-29 07:48:23 -05:00 committed by GitHub
commit fff9ae0802
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,43 @@
{ stdenv
, fetchFromGitHub
, rustPlatform
, gtk3
, AppKit
, pkg-config
, python3
}:
rustPlatform.buildRustPackage rec {
pname = "xprite-editor-unstable";
version = "2019-09-22";
src = fetchFromGitHub {
owner = "rickyhan";
repo = "xprite-editor";
rev = "7f899dff982642927024540e4bafd74e4ea5e52a";
sha256 = "1k6k8y8gg1vdmyjz27q689q9rliw0rrnzwlpjcd4vlc6swaq9ahx";
fetchSubmodules = true;
# Rename unicode file name which leads to different checksums on HFS+
# vs. other filesystems because of unicode normalization.
postFetch = ''
mv $out/config/palettes/Sweet\ Guaran*.hex $out/config/palettes/Sweet\ Guarana.hex
'';
};
buildInputs = stdenv.lib.optionals stdenv.isLinux [ gtk3 ]
++ stdenv.lib.optionals stdenv.isDarwin [ AppKit ];
nativeBuildInputs = stdenv.lib.optionals stdenv.isLinux [ pkg-config python3 ];
cargoSha256 = "0cd58888l7pjmghin31ha780yhs2pz67b10jysyasdw0a88m0dwy";
cargoBuildFlags = [ "--bin" "xprite-native" ];
meta = with stdenv.lib; {
homepage = "https://github.com/rickyhan/xprite-editor";
description = "Pixel art editor";
license = licenses.gpl3;
maintainers = [ maintainers.marsam ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View file

@ -7144,6 +7144,10 @@ in
xorriso = callPackage ../tools/cd-dvd/xorriso { };
xprite-editor = callPackage ../tools/misc/xprite-editor {
inherit (darwin.apple_sdk.frameworks) AppKit;
};
xpf = callPackage ../tools/text/xml/xpf {
libxml2 = libxml2Python;
};