flake.nix: add libdib

This commit is contained in:
2025-06-07 15:02:29 +02:00
parent 0844843e59
commit 2c77ae6357
4 changed files with 86 additions and 7 deletions

76
flake.lock generated
View File

@@ -17,13 +17,65 @@
"type": "indirect" "type": "indirect"
} }
}, },
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"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_2",
"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": 1742288794, "lastModified": 1749143949,
"narHash": "sha256-Txwa5uO+qpQXrNG4eumPSD+hHzzYi/CdaM80M9XRLCo=", "narHash": "sha256-QuUtALJpVrPnPeozlUG/y+oIMSLdptHxb3GK6cpSVhA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b6eaf97c6960d97350c584de1b6dcff03c9daf42", "rev": "d3d2d80a2191a73d1e86456a751b83aa13085d7d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1749143949,
"narHash": "sha256-QuUtALJpVrPnPeozlUG/y+oIMSLdptHxb3GK6cpSVhA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d3d2d80a2191a73d1e86456a751b83aa13085d7d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -36,7 +88,8 @@
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "libdib": "libdib",
"nixpkgs": "nixpkgs_2"
} }
}, },
"systems": { "systems": {
@@ -53,6 +106,21 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_2": {
"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,9 +1,13 @@
{ {
description = "Dibbler samspleisebod"; description = "Dibbler samspleisebod";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs, flake-utils }: let libdib.url = "git+https://git.pvv.ntnu.no/Projects/libdib.git";
};
outputs = { self, nixpkgs, flake-utils, libdib }: let
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
systems = [ systems = [
@@ -14,7 +18,12 @@
]; ];
forAllSystems = f: lib.genAttrs systems (system: let forAllSystems = f: lib.genAttrs systems (system: let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = import nixpkgs {
inherit system;
overlays = [
libdib.overlays.default
];
};
in f system pkgs); in f system pkgs);
in { in {
packages = forAllSystems (system: pkgs: { packages = forAllSystems (system: pkgs: {

View File

@@ -16,6 +16,7 @@ python3Packages.buildPythonApplication {
nativeBuildInputs = with python3Packages; [ setuptools ]; nativeBuildInputs = with python3Packages; [ setuptools ];
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3Packages; [
brother-ql brother-ql
libdib
matplotlib matplotlib
psycopg2 psycopg2
python-barcode python-barcode

View File

@@ -12,6 +12,7 @@ mkShell {
(python.withPackages (ps: with ps; [ (python.withPackages (ps: with ps; [
brother-ql brother-ql
matplotlib matplotlib
libdib
psycopg2 psycopg2
python-barcode python-barcode
sqlalchemy sqlalchemy