Unverified Commit a510ae89 authored by superherointj's avatar superherointj Committed by GitHub
Browse files

Merge pull request #288931 from heywoodlh/choose-gui

choose-gui: init 1.3.1
parents 33f3c503 35a5615f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -8049,6 +8049,12 @@
    name = "Nova Witterick";
    keys = [ { fingerprint = "4304 6B43 8D83 078E 3DF7  10D6 DEB0 E15C 6D2A 5A7C"; } ];
  };
  heywoodlh = {
    email = "nixpkgs@heywoodlh.io";
    github = "heywoodlh";
    githubId = 18178614;
    name = "Spencer Heywood";
  };
  hh = {
    email = "hh@m-labs.hk";
    github = "HarryMakes";
+48 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  xcbuild,
  darwin,
}:

stdenv.mkDerivation rec {
  pname = "choose-gui";
  version = "1.3.1";

  src = fetchFromGitHub {
    owner = "chipsenkbeil";
    repo = "choose";
    rev = version;
    hash = "sha256-oR0GgMinKcBHaZWdE7O+mdbiLKKjkweECKbi80bjW+c=";
  };

  nativeBuildInputs = [ xcbuild ];

  buildInputs = [ darwin.apple_sdk.frameworks.Cocoa ];

  buildPhase = ''
    runHook preBuild
    xcodebuild -arch ${stdenv.hostPlatform.darwinArch} -configuration Release SYMROOT="./output" build
    cp ./output/Release/choose choose
    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall
    mkdir -p $out/bin
    cp choose $out/bin/choose
    chmod +x $out/bin/choose
    runHook postInstall
  '';

  meta = {
    description = "Fuzzy matcher for OS X that uses both std{in,out} and a native GUI";
    homepage = "https://github.com/chipsenkbeil/choose";
    license = lib.licenses.mit;
    platforms = lib.platforms.darwin;
    changelog = "https://github.com/chipsenkbeil/choose/blob/${version}/CHANGELOG.md";
    maintainers = with lib.maintainers; [ heywoodlh ];
    mainProgram = "choose";
  };
}