nur-packages

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

package.nix (1089B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   fetchYarnDeps,
      6   nodejs,
      7   yarnConfigHook,
      8   yarnBuildHook,
      9   secretsConfig ? null,
     10 }:
     11 
     12 stdenv.mkDerivation (finalAttrs: {
     13   pname = "nakarte";
     14   version = "2025-12-20";
     15 
     16   src = fetchFromGitHub {
     17     owner = "sikmir";
     18     repo = "nakarte";
     19     rev = "0a2ffea6c504272cb837cee7afba3087a2e513bc";
     20     hash = "sha256-qrXSLdnwcd59/PMSeUGktkr+iF0YXjPCnVHzsm1NhPA=";
     21   };
     22 
     23   yarnOfflineCache = fetchYarnDeps {
     24     yarnLock = "${finalAttrs.src}/yarn.lock";
     25     hash = "sha256-JFjeu3EVVQkz1jLQX+lb736jzr5xtvor4azctn20Mo4=";
     26   };
     27 
     28   postPatch =
     29     if (secretsConfig != null) then
     30       "cp ${builtins.toFile "secrets.js" secretsConfig} src/secrets.js"
     31     else
     32       "cp src/secrets.js{.template,}";
     33 
     34   nativeBuildInputs = [
     35     nodejs
     36     yarnConfigHook
     37     yarnBuildHook
     38   ];
     39 
     40   installPhase = ''
     41     install -dm755 $out
     42     cp -r build/* $out
     43   '';
     44 
     45   meta = {
     46     homepage = "https://github.com/sikmir/nakarte";
     47     license = lib.licenses.mit;
     48     maintainers = [ lib.maintainers.sikmir ];
     49     platforms = lib.platforms.all;
     50     skip.ci = true;
     51   };
     52 })