mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 06:31:02 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ lib, 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 = "1a0zy8gfc1gdk8nnv5qr4yspqy1jsip5nql3w74rl6h46cplpf5y";
|
|
|
|
cargoBuildFlags = [ "--bin" "xprite-native" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/rickyhan/xprite-editor";
|
|
description = "Pixel art editor";
|
|
license = licenses.gpl3;
|
|
maintainers = [ maintainers.marsam ];
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
};
|
|
}
|