From a110c200e86d2325af07167531fac0f61d9681a0 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Fri, 26 Dec 2025 18:41:26 +0100 Subject: Switch to GUI to manage the library Allow to regroup the CLI and the view into one unique tool. --- flake.nix | 46 ++++++++++++++++++---------------------------- 1 file changed, 18 insertions(+), 28 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 7d00ae7..9b69665 100644 --- a/flake.nix +++ b/flake.nix @@ -1,34 +1,24 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs"; - flake-utils.url = "github:numtide/flake-utils"; + nixpkgs.url = "github:nixos/nixpkgs"; }; - outputs = { self, nixpkgs, flake-utils, ... }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { inherit system; }; - - ebook-convert = with pkgs; writeShellScriptBin "ebook-convert" '' - set -euo pipefail - ${calibre}/bin/ebook-convert "$@" - ''; - in with pkgs; { - devShell = mkShell { - buildInputs = [ - esbuild - nodePackages.typescript - psmisc # fuser - watchexec - - # CLI - python311 - python311Packages.pillow - python311Packages.pytest - python311Packages.requests - ebook-convert - ]; - }; - } + outputs = { self, nixpkgs, ... }: + let + eachSystem = with nixpkgs.lib; f: foldAttrs mergeAttrs {} + (map (s: mapAttrs (_: v: { ${s} = v; }) (f s)) systems.flakeExposed); + in eachSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + gtk4 + sqlite + libadwaita + gobject-introspection + (python3.withPackages (subpkgs: with subpkgs; [ + pygobject3 nanoid requests pillow numpy calibre pytest + ])) + ]; + }; } ); } -- cgit v1.2.3