Compare commits
2 Commits
e07d9f21dc
...
6491ba90ad
| Author | SHA1 | Date | |
|---|---|---|---|
| 6491ba90ad | |||
| 967cfba8ec |
34
flake.nix
34
flake.nix
@ -2,17 +2,39 @@
|
||||
inputs.nixpkgs.url = "nixpkgs";
|
||||
|
||||
outputs = { self, nixpkgs, ...}:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
let
|
||||
# For now we only support x86
|
||||
system = "x86_64-linux";
|
||||
overlays = [ self.overlays.default ];
|
||||
};
|
||||
in
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ self.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
bscOverlay = import ./overlay.nix;
|
||||
overlays.default = self.bscOverlay;
|
||||
legacyPackages.x86_64-linux = pkgs;
|
||||
# full nixpkgs with our overlay applied
|
||||
legacyPackages.${system} = pkgs;
|
||||
|
||||
# packages added by our overlay
|
||||
packages.${system} =
|
||||
let
|
||||
inherit (builtins) attrNames removeAttrs;
|
||||
inherit (nixpkgs.lib) flip filterAttrs getAttrs pipe isDerivation;
|
||||
in
|
||||
# extract the names of the packages from the overlay, then get the
|
||||
# actual packages from the full package set with the overlay applied
|
||||
pipe (self.overlays.default null { inherit (nixpkgs) lib; }) [
|
||||
attrNames
|
||||
(flip getAttrs pkgs)
|
||||
(flip removeAttrs [ "bsc" ])
|
||||
(filterAttrs (_: isDerivation))
|
||||
];
|
||||
|
||||
hydraJobs = {
|
||||
inherit (self.legacyPackages.x86_64-linux.bsc-ci) test;
|
||||
packages = self.packages.${system};
|
||||
};
|
||||
|
||||
# propagate nixpkgs lib, so we can do bscpkgs.lib
|
||||
inherit (nixpkgs) lib;
|
||||
|
||||
Reference in New Issue
Block a user