diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-03-24 11:04:41 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-03-24 11:04:41 +0100 |
commit | 5423cabbbf2b6dec5568f1ecabd288d5d9a642ec (patch) | |
tree | f316a6a921bfefd3a63bd4502c2eb50ff1644f67 /nixpkgs/pkgs/by-name/nd/ndstrim/package.nix | |
parent | 46a88117a05c3469af5d99433af140c3de8ca088 (diff) | |
parent | 8aa81f34981add12aecada6c702ddbbd0375ca36 (diff) | |
download | nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.gz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.bz2 nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.lz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.xz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.zst nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/by-name/nd/ndstrim/package.nix')
-rw-r--r-- | nixpkgs/pkgs/by-name/nd/ndstrim/package.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/nd/ndstrim/package.nix b/nixpkgs/pkgs/by-name/nd/ndstrim/package.nix new file mode 100644 index 000000000000..403bd831a76b --- /dev/null +++ b/nixpkgs/pkgs/by-name/nd/ndstrim/package.nix @@ -0,0 +1,50 @@ +{ lib +, fetchFromGitHub +, fetchpatch +, rustPlatform +}: + +rustPlatform.buildRustPackage rec { + pname = "ndstrim"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "Nemris"; + repo = "ndstrim"; + rev = "v${version}"; + hash = "sha256-KgtejBbFg6+klc8OpCs1CIb+7uVPCtP0/EM671vxauk="; + }; + + patches = [ + # https://github.com/Nemris/ndstrim/pull/1 + (fetchpatch { + name = "update-cargo-lock.patch"; + url = "https://github.com/Nemris/ndstrim/commit/8147bb31a8fb5765f33562957a61cb6ddbe65513.patch"; + hash = "sha256-HsCc5un9dg0gRkRjwxtjms0cugqWhcTthGfcF50EgYA="; + }) + ]; + + cargoHash = "sha256-k5SlsIWHEZaYwk5cmLb1QMs3lk0VGGwiGd1TSQJC3Ss="; + + # TODO: remove this after upstream merge above patch. + # Without the workaround below the build results in the following error: + # Validating consistency between /build/source/Cargo.lock and /build/ndstrim-0.2.1-vendor.tar.gz/Cargo.lock + # <hash> + # < version = "0.2.1" + # --- + # > version = "0.1.0" + # + # ERROR: cargoHash or cargoSha256 is out of date + postPatch = '' + cargoSetupPostPatchHook() { true; } + ''; + + meta = with lib; { + description = "Trim the excess padding found in Nintendo DS(i) ROMs"; + homepage = "https://github.com/Nemris/ndstrim"; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with maintainers; [ thiagokokada ]; + mainProgram = "ndstrim"; + }; +} |