add extralib dependency

This commit is contained in:
Rongsong Shen 2025-12-05 16:06:25 +08:00
parent cc4718f3fa
commit 7b5f280ae5
2 changed files with 81 additions and 10 deletions

84
src/flake.lock generated
View file

@ -1,5 +1,25 @@
{
"nodes": {
"extralib": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1764921004,
"narHash": "sha256-Odh7nfv8ynvrM0b7BxsDgnM76dTJfjakn+U5Re6LCBc=",
"ref": "main",
"rev": "d370b0450779b6c8befc88fd41cc06c9e1e4e40a",
"revCount": 3,
"type": "git",
"url": "ssh://forgejo@gitea.shenrs.eu/nexa/extralibs"
},
"original": {
"ref": "main",
"type": "git",
"url": "ssh://forgejo@gitea.shenrs.eu/nexa/extralibs"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -36,6 +56,24 @@
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1764517877,
@ -53,6 +91,22 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1764667669,
"narHash": "sha256-7WUCZfmqLAssbDqwg9cUDAXrSoXN79eEEq17qhTNM/Y=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "418468ac9527e799809c900eda37cbff999199b6",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1762111121,
"narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=",
@ -70,8 +124,9 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"extralib": "extralib",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2",
"xbuild": "xbuild"
}
},
@ -105,17 +160,32 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"xbuild": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1764668487,
"narHash": "sha256-nHWnWj57jG4TRSG5R7BNG5Wh6XfPXYHKrRchDCEid+M=",
"lastModified": 1764733489,
"narHash": "sha256-y0WYBG5Yx6Ipo6EiNqw60h3X9M5XMeesZfrew3srcNg=",
"owner": "shen390s",
"repo": "my-nix-channel",
"rev": "b590911ebd783b12ac8577e70f494c8226589b75",
"rev": "3bc72b826a5d38120df24ee7910bb991eae4d3e7",
"type": "github"
},
"original": {

View file

@ -4,10 +4,11 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
xbuild.url = "github:shen390s/my-nix-channel?ref=master";
extralib.url = "git+ssh://forgejo@gitea.shenrs.eu/nexa/extralibs?ref=main";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, xbuild, flake-utils }:
outputs = { self, nixpkgs, xbuild, extralib, flake-utils }:
let
supportedSystems = [ "x86_64-linux" ];
myCommitId =
@ -17,9 +18,9 @@
in
flake-utils.lib.eachSystem supportedSystems (
system: let
mypkgs = xbuild.packages.${system};
mypkgs = xbuild.packages.${system} // extralib.packages.${system};
overlays = [
(final: prev: prev // mypkgs)
(final: prev: mypkgs // prev)
];
pkgs = import nixpkgs { inherit overlays system;};
xpkgs = import ./nixSupport/default.nix {