diff options
| author | uakci <uakci@uakci.pl> | 2022-05-13 22:00:14 +0200 |
|---|---|---|
| committer | uakci <uakci@uakci.pl> | 2022-05-13 22:00:14 +0200 |
| commit | 6b0785afd2c7dfb7ebcfeb2e811fec19823c07aa (patch) | |
| tree | 2a5b0bb802648368e3a97eaa3a236137df8be1e2 | |
| parent | fix shell (diff) | |
| download | nuogai-6b0785afd2c7dfb7ebcfeb2e811fec19823c07aa.tar.gz nuogai-6b0785afd2c7dfb7ebcfeb2e811fec19823c07aa.zip | |
dirty fix for imagemagick not showing up in $PATH
| -rw-r--r-- | flake.nix | 18 | ||||
| -rw-r--r-- | module.nix | 4 |
2 files changed, 14 insertions, 8 deletions
@@ -24,6 +24,8 @@ mkdir -p $out/share/fonts cp ${./ToaqScript.ttf} $out/share/fonts/ToaqScript.ttf ''; + imagemagick' = imagemagick.overrideAttrs + (a: { buildInputs = a.buildInputs ++ [ pango ]; }); schemePkgs = lib.mapAttrs (name: { src, install, patches }: pkgs.stdenv.mkDerivation { @@ -58,16 +60,18 @@ name = "nuogai"; src = ./.; modules = ./gomod2nix.toml; - buildInputs = (builtins.attrValues schemePkgs) ++ [ - toaqScript - (imagemagick.overrideAttrs - (a: { buildInputs = a.buildInputs ++ [ pango ]; })) - ]; + buildInputs = (builtins.attrValues schemePkgs) + ++ [ toaqScript imagemagick' ]; }; in { defaultPackage = nuogai; - packages = schemePkgs // { inherit toaqScript nuogai; }; + packages = schemePkgs // { + inherit toaqScript nuogai; + imagemagick = imagemagick'; + }; nixosModule = { config, pkgs, lib, ... }@args: import ./module.nix (args // { inherit self system; }); - }) // { inherit (gomod2nix) devShell; }; + }) // { + inherit (gomod2nix) devShell; + }; } @@ -11,7 +11,8 @@ in with lib; { ]); tokenPath = mkOption { type = types.path; }; }; - config = let enable = cfg.enable; in { + config = let enable = cfg.enable; + in { fonts.fonts = optionals enable [ self.packages.${system}.toaqScript ]; systemd.services = optionalAttrs enable (mapAttrs (k: v: { @@ -28,6 +29,7 @@ in with lib; { }; script = '' export TOKEN=$(cat ${cfg.tokenPath}) + export PATH+=${self.packages.${system}.imagemagick}/bin ${pkg}/bin/nuogai ''; }; |
