nix: initial copying over of flake.nix from deepdog, might not work
This commit is contained in:
parent
fa6875bfc4
commit
f9be492c0f
89
flake.nix
89
flake.nix
@ -1,55 +1,46 @@
|
|||||||
{
|
{
|
||||||
description = "Application packaged using poetry2nix";
|
description = "Application packaged using poetry2nix";
|
||||||
|
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils?rev=0f8662f1319ad6abf89b3380dd2722369fc51ade";
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs?rev=e194871435cad8ffb1d64b64fb7df3b2b8a10088";
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
|
||||||
inputs.poetry2nix.url = "github:nix-community/poetry2nix?rev=7b71679fa7df00e1678fc3f1d1d4f5f372341b63";
|
inputs.poetry2nixSrc = {
|
||||||
|
url = "github:nix-community/poetry2nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
|
outputs = { self, nixpkgs, flake-utils, poetry2nixSrc }:
|
||||||
{
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
# Nixpkgs overlay providing the application
|
|
||||||
overlay = nixpkgs.lib.composeManyExtensions [
|
|
||||||
poetry2nix.overlay
|
|
||||||
(final: prev: {
|
|
||||||
# The application
|
|
||||||
tantri = prev.poetry2nix.mkPoetryApplication {
|
|
||||||
overrides = [
|
|
||||||
prev.poetry2nix.defaultPoetryOverrides
|
|
||||||
];
|
|
||||||
projectDir = ./.;
|
|
||||||
};
|
|
||||||
tantriEnv = prev.poetry2nix.mkPoetryEnv {
|
|
||||||
overrides = [
|
|
||||||
prev.poetry2nix.defaultPoetryOverrides
|
|
||||||
];
|
|
||||||
projectDir = ./.;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
} // (flake-utils.lib.eachDefaultSystem (system:
|
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
inherit system;
|
poetry2nix = poetry2nixSrc.lib.mkPoetry2Nix { inherit pkgs; };
|
||||||
overlays = [ self.overlay ];
|
in {
|
||||||
};
|
packages = {
|
||||||
in
|
tantriApp = poetry2nix.mkPoetryApplication {
|
||||||
{
|
projectDir = self;
|
||||||
apps = {
|
python = pkgs.python39;
|
||||||
tantri = pkgs.tantri;
|
preferWheels = true;
|
||||||
};
|
};
|
||||||
|
tantriEnv = poetry2nix.mkPoetryEnv {
|
||||||
defaultApp = pkgs.tantri;
|
projectDir = self;
|
||||||
devShell = pkgs.mkShell {
|
python = pkgs.python39;
|
||||||
buildInputs = [
|
preferWheels = true;
|
||||||
pkgs.poetry
|
overrides = poetry2nix.overrides.withDefaults (self: super: {
|
||||||
pkgs.tantriEnv
|
});
|
||||||
pkgs.tantri
|
};
|
||||||
];
|
default = self.packages.${system}.tantriEnv;
|
||||||
shellHook = ''
|
};
|
||||||
export DO_NIX_CUSTOM=1
|
devShells.default = pkgs.mkShell {
|
||||||
'';
|
inputsFrom = [ self.packages.${system}.tantriEnv ];
|
||||||
packages = [ pkgs.nodejs-16_x pkgs.gnupg ];
|
buildInputs = [
|
||||||
};
|
pkgs.poetry
|
||||||
|
self.packages.${system}.tantriEnv
|
||||||
}));
|
self.packages.${system}.tantriApp
|
||||||
|
pkgs.just
|
||||||
|
];
|
||||||
|
shellHook = ''
|
||||||
|
export DO_NIX_CUSTOM=1
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user