separate runtime dependencies

this is only intended to be temporary until the flake is updated
This commit is contained in:
zowoq 2024-02-28 19:44:47 +10:00
parent 0572aa48da
commit 71ab24a2eb
3 changed files with 24 additions and 2 deletions

View File

@ -55,9 +55,26 @@
"inputs": { "inputs": {
"mmdoc": "mmdoc", "mmdoc": "mmdoc",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"runtimeDeps": "runtimeDeps",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
} }
}, },
"runtimeDeps": {
"locked": {
"lastModified": 1714247354,
"narHash": "sha256-6dFKqP/aCKIdpOgqgIQUrRT0NOfVc14ftNcdELa4Pu4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c8d7c8a78fb516c0842cc65346506a565c88014d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [

View File

@ -7,10 +7,12 @@
inputs.treefmt-nix.url = "github:numtide/treefmt-nix"; inputs.treefmt-nix.url = "github:numtide/treefmt-nix";
inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
inputs.runtimeDeps.url = "github:NixOS/nixpkgs/nixos-unstable-small";
nixConfig.extra-substituters = "https://nix-community.cachix.org"; nixConfig.extra-substituters = "https://nix-community.cachix.org";
nixConfig.extra-trusted-public-keys = "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="; nixConfig.extra-trusted-public-keys = "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
outputs = { self, nixpkgs, mmdoc, treefmt-nix } @ args: outputs = { self, nixpkgs, mmdoc, treefmt-nix, runtimeDeps } @ args:
let let
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
eachSystem = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system}); eachSystem = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});

View File

@ -1,5 +1,6 @@
{ nixpkgs { nixpkgs
, mmdoc , mmdoc
, runtimeDeps
, system , system
, self , self
, ... , ...
@ -7,9 +8,11 @@
let let
runtimePkgs = import runtimeDeps { inherit system; };
pkgs = import nixpkgs { inherit system; config = { allowBroken = true; }; }; pkgs = import nixpkgs { inherit system; config = { allowBroken = true; }; };
drvAttrs = attrs: with pkgs; { drvAttrs = attrs: with runtimePkgs; {
NIX = nix; NIX = nix;
GIT = git; GIT = git;
JQ = jq; JQ = jq;