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" "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1669833724, "lastModified": 1669833724,
@ -35,6 +50,7 @@
"root": { "root": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"my-flake": "my-flake",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View File

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