From 4de208543c17074fe77c1ac101854e2a2a0108c3 Mon Sep 17 00:00:00 2001 From: ckie Date: Sun, 27 Oct 2024 01:42:32 +0200 Subject: [PATCH] feat(flake): make petalpkgs src available for docs --- .envrc | 1 + .gitignore | 4 ++++ flake.lock | 18 +++++++++++++++++- flake.nix | 7 ++++++- 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 79518f7..4c0db6f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules +.petalpkgs # Output .output @@ -6,6 +7,9 @@ node_modules /.svelte-kit /build +# Direnv cache +/.direnv + # OS .DS_Store Thumbs.db diff --git a/flake.lock b/flake.lock index 0136f65..91e4e92 100644 --- a/flake.lock +++ b/flake.lock @@ -34,10 +34,26 @@ "type": "github" } }, + "petalpkgs": { + "locked": { + "lastModified": 1727211631, + "narHash": "sha256-o1JyfLf2U4gMGnc/ZiYw9nPjbOEA7qUUYAcUBegSSjY=", + "ref": "refs/heads/main", + "rev": "568a619fe669c876f774e703d0c3a1aff5c8d639", + "revCount": 686265, + "type": "git", + "url": "https://cl.forkos.org/nixpkgs" + }, + "original": { + "type": "git", + "url": "https://cl.forkos.org/nixpkgs" + } + }, "root": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "petalpkgs": "petalpkgs" } }, "systems": { diff --git a/flake.nix b/flake.nix index 1a63c29..db06897 100644 --- a/flake.nix +++ b/flake.nix @@ -2,9 +2,10 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; + petalpkgs.url = "git+https://cl.forkos.org/nixpkgs"; }; - outputs = { self, nixpkgs, flake-utils }: + outputs = { self, nixpkgs, flake-utils, petalpkgs }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; in { @@ -13,6 +14,10 @@ LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc.lib ]; buildInputs = with pkgs; [ bun ]; + + shellHook = '' + ln -sf ${petalpkgs.path} .petalpkgs + ''; }; # ... and remote deployment.