nur-packages

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

package.nix (1184B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitea,
      5   autoreconfHook,
      6   pkg-config,
      7   texinfo,
      8   makeWrapper,
      9   guile,
     10 }:
     11 
     12 stdenv.mkDerivation (finalAttrs: {
     13   pname = "msg-cli";
     14   version = "0.1.1";
     15 
     16   __structuredAttrs = true;
     17 
     18   src = fetchFromGitea {
     19     domain = "forge.superkamiguru.org";
     20     owner = "MSG";
     21     repo = "msg-cli";
     22     tag = "v${finalAttrs.version}";
     23     hash = "sha256-M/MksKwmV/PQxRtv9cT3KwMquhu2yUyBI9+jQL/vsfA=";
     24   };
     25 
     26   postPatch = ''
     27     substituteInPlace msg/machine.scm \
     28       --replace-fail "/opt/homebrew/bin/" "" \
     29       --replace-fail "/usr/local/bin/" ""
     30   '';
     31 
     32   nativeBuildInputs = [
     33     autoreconfHook
     34     pkg-config
     35     texinfo # For makeinfo
     36     makeWrapper
     37   ];
     38 
     39   buildInputs = [ guile ];
     40 
     41   postInstall = ''
     42     wrapProgram $out/bin/msg \
     43       --prefix GUILE_LOAD_PATH : "$out/${guile.siteDir}:$GUILE_LOAD_PATH" \
     44       --prefix GUILE_LOAD_COMPILED_PATH : "$out/${guile.siteCcacheDir}:$GUILE_LOAD_COMPILED_PATH"
     45   '';
     46 
     47   meta = {
     48     description = "MacOS Subsystem for Guix";
     49     homepage = "https://forge.superkamiguru.org/MSG/msg-cli";
     50     license = lib.licenses.agpl3Only;
     51     maintainers = [ lib.maintainers.sikmir ];
     52     mainProgram = "msg";
     53   };
     54 })