nur-packages

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

default.nix (947B)


      1 { lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles, makeWrapper, pkg-config
      2 , withGui ? stdenv.isLinux, vte # vte is broken on darwin
      3 }:
      4 
      5 buildGoModule rec {
      6   pname = "o";
      7   version = "2.55.1";
      8 
      9   src = fetchFromGitHub {
     10     owner = "xyproto";
     11     repo = "o";
     12     rev = "v${version}";
     13     hash = "sha256-owueLd6kR/bDFxKI9QOUgriH63XRsEEpIFfp5aRTSbI=";
     14   };
     15 
     16   vendorSha256 = null;
     17 
     18   nativeBuildInputs = [ installShellFiles makeWrapper pkg-config ];
     19 
     20   buildInputs = lib.optional withGui vte;
     21 
     22   preBuild = "cd v2";
     23 
     24   postInstall = ''
     25     cd ..
     26     installManPage o.1
     27   '' + lib.optionalString withGui ''
     28     make install-gui PREFIX=$out
     29     wrapProgram $out/bin/ko --prefix PATH : $out/bin
     30   '';
     31 
     32   meta = with lib; {
     33     description = "Config-free text editor and IDE limited to VT100";
     34     inherit (src.meta) homepage;
     35     license = licenses.bsd3;
     36     maintainers = [ maintainers.sikmir ];
     37     platforms = platforms.unix;
     38   };
     39 }