home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

default.nix (914B)


      1 { stdenv, lib, buildGoModule, fetchFromGitHub }:
      2 
      3 buildGoModule rec {
      4   name = "gosmee-${version}";
      5   version = "0.14.0";
      6   rev = "${version}";
      7 
      8   src = fetchFromGitHub {
      9     inherit rev;
     10     owner = "chmouel";
     11     repo = "gosmee";
     12     sha256 = "sha256-VKH0ajtLndTdW0dOY3XpixkTGy7Kvac7poFZVzj5HQU=";
     13   };
     14   vendorHash = null;
     15 
     16   postUnpack = ''
     17     printf ${version} > $sourceRoot/gosmee/templates/version
     18   '';
     19 
     20   postInstall = ''
     21     # completions
     22     mkdir -p $out/share/bash-completion/completions/
     23     $out/bin/gosmee completion bash > $out/share/bash-completion/completions/gosmee
     24     mkdir -p $out/share/zsh/site-functions
     25     $out/bin/gosmee completion zsh > $out/share/zsh/site-functions/_gosmee
     26   '';
     27 
     28   meta = {
     29     description = "Command line server and client for webhooks deliveries (and https://smee.io)";
     30     homepage = "https://github.com/chmouel/gosmee";
     31     license = lib.licenses.asl20;
     32   };
     33 }