flake.nix: add libdib

This commit is contained in:
2025-06-07 15:07:14 +02:00
parent 5bb294a54b
commit 4793df09c0
2 changed files with 71 additions and 6 deletions

60
flake.lock generated
View File

@@ -1,12 +1,50 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"id": "flake-utils",
"type": "indirect"
}
},
"libdib": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1749301134,
"narHash": "sha256-JHLVV4ug8AgG71xhXEdmXozQfesXut6NUdXbBZNkD3c=",
"ref": "refs/heads/main",
"rev": "ca26131c22bb2833c81254dbabab6d785b9f37f0",
"revCount": 8,
"type": "git",
"url": "https://git.pvv.ntnu.no/Projects/libdib.git"
},
"original": {
"type": "git",
"url": "https://git.pvv.ntnu.no/Projects/libdib.git"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1742578646, "lastModified": 1749213349,
"narHash": "sha256-GiQ40ndXRnmmbDZvuv762vS+gew1uDpFwOfgJ8tLiEs=", "narHash": "sha256-UAaWOyQhdp7nXzsbmLVC67fo+QetzoTm9hsPf9X3yr4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "94c4dbe77c0740ebba36c173672ca15a7926c993", "rev": "a4ff0e3c64846abea89662bfbacf037ef4b34207",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -18,8 +56,24 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"libdib": "libdib",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@@ -1,7 +1,12 @@
{ {
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }: let libdib.url = "git+https://git.pvv.ntnu.no/Projects/libdib.git";
libdib.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ self, nixpkgs, ... }: let
systems = [ systems = [
"x86_64-linux" "x86_64-linux"
"aarch64-linux" "aarch64-linux"
@@ -10,7 +15,12 @@
]; ];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: let forAllSystems = f: nixpkgs.lib.genAttrs systems (system: let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = import nixpkgs {
inherit system;
overlays = [
inputs.libdib.overlays.default
];
};
in f system pkgs); in f system pkgs);
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
@@ -28,6 +38,7 @@
}) })
flask-sqlalchemy flask-sqlalchemy
isbnlib isbnlib
libdib
psycopg2-binary psycopg2-binary
python-dotenv python-dotenv
requests requests