diff --git a/.github/workflows/release-pdf.yml b/.github/workflows/release-pdf.yml index 98325ce..494576e 100644 --- a/.github/workflows/release-pdf.yml +++ b/.github/workflows/release-pdf.yml @@ -21,7 +21,7 @@ jobs: run: nix-instantiate --eval -E '(import {}).lib.version' - name: Run a command with nix develop run: | - nix develop --ignore-environment --command bash -c ' + nix develop .#export-pdf --ignore-environment --command bash -c ' pnpm install pnpm export-pdf ' diff --git a/flake.nix b/flake.nix index 5b6c959..b29247b 100644 --- a/flake.nix +++ b/flake.nix @@ -6,27 +6,33 @@ flake-utils.url = "github:numtide/flake-utils"; }; - outputs = - { self - , nixpkgs - , flake-utils - }: - - flake-utils.lib.eachDefaultSystem (system: - let + outputs = { + self, + nixpkgs, + flake-utils, + }: + flake-utils.lib.eachDefaultSystem (system: let overlays = [ (self: super: rec { nodejs = super.nodejs_20; pnpm = super.nodePackages.pnpm; - yarn = (super.yarn.override { inherit nodejs; }); + yarn = super.yarn.override {inherit nodejs;}; }) ]; - pkgs = import nixpkgs { inherit overlays system; }; - pkgs_chromium = import nixpkgs { inherit system; }; - in - { + pkgs = import nixpkgs {inherit overlays system;}; + pkgs_chromium = import nixpkgs {inherit system;}; + packages = with pkgs; [node2nix nodejs pnpm yarn git]; + in { devShells.default = pkgs.mkShell { - packages = with pkgs; [ node2nix nodejs pnpm yarn git]; + inherit packages; + + shellHook = '' + echo "node `${pkgs.nodejs}/bin/node --version`" + ''; + }; + + devShells.export-pdf = pkgs.mkShell { + inherit packages; shellHook = '' echo "node `${pkgs.nodejs}/bin/node --version`"