nur-packages

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

default.nix (959B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   bashInteractive,
      6   installShellFiles,
      7 }:
      8 
      9 stdenv.mkDerivation (finalAttrs: {
     10   pname = "bash-completor";
     11   version = "0.1.0";
     12 
     13   src = fetchFromGitHub {
     14     owner = "adoyle-h";
     15     repo = "bash-completor";
     16     rev = "v${finalAttrs.version}";
     17     hash = "sha256-Ph+cQaXbykn703cdgkqlXcYMO4vvH6e0hCeecWS/6yA=";
     18   };
     19 
     20   nativeBuildInputs = [
     21     bashInteractive
     22     installShellFiles
     23   ];
     24 
     25   buildFlags = [ "build" ];
     26 
     27   installPhase = ''
     28     install -Dm755 dist/bash-completor -t $out/bin
     29     installShellCompletion dist/bash-completor.completion.bash
     30   '';
     31 
     32   meta = {
     33     description = "Creating a bash completion script in a declarative way";
     34     homepage = "https://github.com/adoyle-h/bash-completor";
     35     license = lib.licenses.asl20;
     36     maintainers = [ lib.maintainers.sikmir ];
     37     platforms = lib.platforms.unix;
     38     broken = stdenv.isLinux; # ./tools/build-dist: cannot execute: required file not found
     39   };
     40 })