Port flake to my-flake

This commit is contained in:
Tim Van Baak 2022-12-12 13:53:10 -08:00
parent 25958b123f
commit 7528c2465f
2 changed files with 36 additions and 11 deletions

View File

@ -16,6 +16,21 @@
"type": "github"
}
},
"my-flake": {
"locked": {
"lastModified": 1670879933,
"narHash": "sha256-V45PH0cnFLilx66x4td5qQnWNn/V/6/6b7FQDIHvdyI=",
"owner": "Jaculabilis",
"repo": "my-flake",
"rev": "2b2cd07a6d971b15fc5f65d6d963d0da551a5892",
"type": "github"
},
"original": {
"owner": "Jaculabilis",
"repo": "my-flake",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1669833724,
@ -35,6 +50,7 @@
"root": {
"inputs": {
"flake-compat": "flake-compat",
"my-flake": "my-flake",
"nixpkgs": "nixpkgs"
}
}

View File

@ -1,5 +1,6 @@
{
inputs = {
my-flake.url = "github:Jaculabilis/my-flake";
nixpkgs.url = "github:NixOS/nixpkgs?ref=refs/tags/22.11";
flake-compat = {
url = "github:edolstra/flake-compat";
@ -7,21 +8,29 @@
};
};
outputs = { self, nixpkgs, flake-compat }:
outputs = { self, my-flake, nixpkgs, flake-compat }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
systems = [ "aarch64-linux" "x86_64-linux" ];
each = system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages.${system}.default = (import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
}).inquisitor;
devShells.${system}.default = pkgs.mkShell {
buildInputs = [ (pkgs.python3.withPackages (p: [p.poetry])) ];
};
};
in (my-flake.outputs-for each systems) //
{
packages.${system}.default =
(pkgs.poetry2nix.mkPoetryApplication {
overlays.default = final: prev: {
inquisitor = (final.poetry2nix.mkPoetryApplication {
projectDir = ./.;
}).dependencyEnv;
defaultPackage.${system} = self.packages.${system}.default;
devShell.${system} = pkgs.mkShell {
buildInputs = [ (pkgs.python3.withPackages (p: [p.poetry])) ];
};
};
}