Skip to content

Instantly share code, notes, and snippets.

@ftrvxmtrx
Last active April 24, 2022 10:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ftrvxmtrx/23d8fba6cfbd2cc2a957a2d5cb2dbdc6 to your computer and use it in GitHub Desktop.
Save ftrvxmtrx/23d8fba6cfbd2cc2a957a2d5cb2dbdc6 to your computer and use it in GitHub Desktop.
A Nix expression to build and install orca-c on NixOS
# nix-build -E 'with import <nixpkgs> {}; callPackage ./orca.nix {}'
{ stdenv, ncurses, portmidi }:
stdenv.mkDerivation rec {
name = "orca";
src = ./.;
buildInputs = [ ncurses portmidi ];
enableParallelBuilding = true;
buildPhase = ''
patchShebangs ./tool
make
'';
installPhase = ''
mkdir -p $out/bin
cp build/orca $out/bin/orca
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment