Change:
<ins> { darwin, fetchFromGitHub, fetchpatch, # Delete at next version bump. lib, libgit2, stdenv, }: stdenv.mkDerivation rec { pname = "debase"; # NOTE: When updating version, also update commit hash in prePatch. version = "2"; src = (fetchFromGitHub { owner = "toasterllc"; repo = "debase"; rev = "refs/tags/v${version}"; hash = "sha256-6AavH8Ag+879ntcxJDbVgsg8V6U4cxwPQYPKvq2PpoQ="; fetchSubmodules = true; }).overrideAttrs { # Workaround to fetch git@github.com submodules. # See https://github.com/NixOS/nixpkgs/issues/195117 # # Already fixed in latest upstream, so delete at next version bump. GIT_CONFIG_COUNT = 1; GIT_CONFIG_KEY_0 = "url.https://github.com/.insteadOf"; GIT_CONFIG_VALUE_0 = "git@github.com:"; }; prePatch = '' # xcrun is not available in the Darwin stdenv, but we don't need it anyway. substituteInPlace Makefile  --replace-fail 'xcrun dsymutil' dsymutil # NOTE: Update this when updating version. substituteInPlace Makefile  --replace-fail 'git rev-parse HEAD' 'echo bbe9f1737ab229dd370640a4b5d5e742a051c13b'  --replace-fail '$(GITHASHHEADER): .git/HEAD .git/index' '$(GITHASHHEADER):' ''; patches = [ # Ignore debase's vendored copy of libgit2 in favor of the nixpkgs version. ./ignore-vendored-libgit2.patch # Already fixed in latest upstream, so delete at next version bump. (fetchpatch { url = "https://github.com/toasterllc/debase/commit/d483c5ac016ac2ef3600e93ae4022cd9d7781c83.patch"; hash = "sha256-vVQMOEiLTd46+UknZm8Y197sjyK/kTK/M+9sRX9AssY="; }) ]; buildInputs = [ libgit2 ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk_11_0.frameworks.Foundation ]; installPhase = '' runHook preInstall install -Dm755 build-${if stdenv.isDarwin then "mac" else "linux"}/release/debase $out/bin/debase runHook postInstall ''; enableParallelBuilding = true; makeFlags = [ "ARCHS=${ if stdenv.isx86_64 then "x86_64" else if stdenv.isAarch64 then "arm64" else abort "unsupported system: ${stdenv.system}" }" ]; meta = { description = "TUI for drag-and-drop manipulation of git commits"; homepage = "https://toaster.llc/debase"; # The author has not yet specified a license. # See https://github.com/toasterllc/debase/pull/4 license = lib.licenses.publicDomain; mainProgram = "debase"; maintainers = with lib.maintainers; [ jeremyschlatter aleksana ]; platforms = [ # Only these systems are supported by Makefile "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; }; } </ins>

Discussion:
Project description debase is a TUI for drag-and-drop manipulation of Git commits: Metadata homepage URL: source URL: license: proprietary platforms: Linux, macOS Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
I noticed it bundles a vastly outdated version (2.0) of a , which makes it quite risky. It also oddly bundles its own , and I couldn't get it to use the system .
I've been playing around with packaging it. Here's what I have so far: This packages debase two different ways: one with debase's vendored and , and one with nix's and . The parameter switches between them. Both versions are building and running for me on my aarch64-darwin laptop. Using the nix deps seems better, but debase has made a few patches to its copy of ncurses that are necessary to support its drag-and-drop features. I'm looking into that now to see if there is a good way to use nix's ncurses while still supporting those features. Using nix's libgit2 just seems to be a straightforward win, though.
I've looked at the patches that debase made to ncurses, and they are significant enough that it seems worthwhile to use debases's vendored copy of ncurses instead of using nix's ncurses. Also, debase has now changed its submodule URLs, which allows us to drop the GITCONFIG* overrides. So here is a derivation that builds debase using debase's vendored ncurses and nix's libgit2: I tested it on my aarch64-darwin laptop and it builds and runs and supports drag and drop.
Due to the fact that it's still unlicensed (hence redistribution or even patching may not be appropriate), I'd hold off on packaging this.
The bundled http-parser issue is easy to resolve. It is part of libgit2, but as demonstrated in the packages I provided above and in the linked (closed) PR, you can use nixpkgs' libgit2 instead, which is up to date and no longer uses http-parser. I agree the lack of license is still an issue, though.
The linked PR doesn't build on linux, but fair enough, the license is really what gives me pause.

Whoops, I see I broke the PR on linux during the review process. FWIW I just pushed a fix.