nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (1120B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitea,
      5   cmake,
      6   pkg-config,
      7   makeWrapper,
      8   SDL2,
      9   the-foundation,
     10   AppKit,
     11 }:
     12 
     13 stdenv.mkDerivation (finalAttrs: {
     14   pname = "bwh";
     15   version = "1.0.3";
     16 
     17   src = fetchFromGitea {
     18     domain = "git.skyjake.fi";
     19     owner = "skyjake";
     20     repo = "bwh";
     21     rev = "v${finalAttrs.version}";
     22     hash = "sha256-POKjvUGFS3urc1aqOvfCAApUnRxoZhU725eYRAS4Z2w=";
     23   };
     24 
     25   nativeBuildInputs = [
     26     cmake
     27     pkg-config
     28     makeWrapper
     29   ];
     30 
     31   buildInputs = [
     32     SDL2
     33     the-foundation
     34   ] ++ lib.optional stdenv.isDarwin AppKit;
     35 
     36   installPhase = lib.optionalString stdenv.isDarwin ''
     37     runHook preInstall
     38     mkdir -p $out/Applications
     39     mv *.app $out/Applications
     40     makeWrapper $out/{Applications/Bitwise\ Harmony.app/Contents/MacOS/Bitwise\ Harmony,bin/bitwise-harmony}
     41     runHook postInstall
     42   '';
     43 
     44   meta = {
     45     description = "Bitwise Harmony - simple synth tracker";
     46     homepage = "https://git.skyjake.fi/skyjake/bwh";
     47     license = lib.licenses.bsd2;
     48     maintainers = [ lib.maintainers.sikmir ];
     49     platforms = lib.platforms.unix;
     50     mainProgram = "bitwise-harmony";
     51   };
     52 })