-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df790b1
commit e972bec
Showing
4 changed files
with
734 additions
and
833 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,46 @@ | ||
{ | ||
description = "fava-envelope"; | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
flake-utils.inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
description = "Application packaged using poetry2nix"; | ||
|
||
outputs = { self, nixpkgs, ... }@inputs: inputs.flake-utils.lib.eachSystem [ | ||
"x86_64-linux" | ||
] | ||
(system: | ||
let pkgs = import nixpkgs { | ||
inherit system; | ||
}; | ||
in | ||
{ | ||
devShell = pkgs.mkShell rec { | ||
name = "beancount-prj"; | ||
packages = with pkgs; [ | ||
# python | ||
python3 | ||
poetry | ||
python3Packages.beancount | ||
inputs.flake-utils.url = "github:numtide/flake-utils"; | ||
inputs.nixpkgs.url = "github:NixOS/nixpkgs"; | ||
inputs.poetry2nix.url = "github:nix-community/poetry2nix"; | ||
|
||
outputs = { self, nixpkgs, flake-utils, poetry2nix }: | ||
{ | ||
# Nixpkgs overlay providing the application | ||
overlay = nixpkgs.lib.composeManyExtensions [ | ||
poetry2nix.overlay | ||
]; | ||
} // (flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
overlays = [ | ||
self.overlay | ||
]; | ||
nativeBuildInputs = [ pkgs.pkg-config ]; | ||
DBUS_PATH = "${pkgs.dbus}"; | ||
shellHook = '' | ||
source $(poetry env info --path)/bin/activate | ||
''; | ||
}; | ||
}); | ||
in | ||
{ | ||
devShell = | ||
let | ||
fava_envelope_env = pkgs.poetry2nix.mkPoetryEnv { | ||
projectDir = ./.; | ||
editablePackageSources = { | ||
fava_envelope = ./fava_envelope; | ||
}; | ||
overrides = pkgs.poetry2nix.overrides.withDefaults ( | ||
self: super: { | ||
python-magic = pkgs.python39.pkgs.python_magic; | ||
numpy = pkgs.python39.pkgs.numpy; | ||
} | ||
); | ||
}; | ||
in | ||
pkgs.mkShell { | ||
buildInputs = [ | ||
fava_envelope_env | ||
pkgs.poetry | ||
]; | ||
}; | ||
})); | ||
} |
Oops, something went wrong.