From 8ef172419e30e8e3c110116f61d0b1eaca23c0a5 Mon Sep 17 00:00:00 2001 From: uakci Date: Mon, 20 Sep 2021 15:39:43 +0200 Subject: hotfix & nixfmt --- flake.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 22f6827..87739ce 100644 --- a/flake.nix +++ b/flake.nix @@ -22,33 +22,36 @@ }).pkgs; in with pkgs; let - toaqScript = - pkgs.writeTextDir "share/fonts/ToaqScript.ttf" ./ToaqScript.ttf; + toaqScript = runCommand "toaq-script" { } '' + mkdir -p $out/share/fonts + cp ${./ToaqScript.ttf} $out/share/fonts/ToaqScript.ttf + ''; schemePkgs = lib.mapAttrs (name: { src, install, patches }: pkgs.stdenv.mkDerivation { inherit src name patches; - buildInputs = [ pkgs.guile ]; + buildInputs = [ guile ]; installPhase = '' mkdir -p $out/bin cp -r ./* $out - echo "${install}" > $out/bin/${name} - chmod +x $out/bin/${name} + cp "${writers.writeBash "${name}-start" install}" $out/bin/${name} ''; }) { nuigui = { src = nuigui-upstream; patches = [ ./patches/nui.patch ]; install = '' - cd \$(dirname \$0)/../; ${pkgs.guile}/bin/guile web.scm + cd $(dirname $0)/../ + ${guile}/bin/guile web.scm ''; }; serial-predicate-engine = { src = serial-predicate-engine-upstream; patches = [ ./patches/spe.patch ]; install = '' - cd \$(dirname \$0)/../web/; ${pkgs.guile}/bin/guile webservice.scm - ''; + cd $(dirname $0)/../web/ + ${guile}/bin/guile webservice.scm + ''; }; }; nuogai = buildGoApplication { @@ -66,6 +69,7 @@ in { defaultPackage = nuogai; packages = schemePkgs // { inherit toaqScript nuogai; }; - nixosModule = a: import ./module.nix (a // { inherit self system; }); + nixosModule = { config, pkgs, lib, ... }@a: + import ./module.nix (a // { inherit self system; }); }); } -- cgit v1.2.3