-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Once merged, running `nix run 'github:pazz/alot'` will be able to run a master version of alot. This assumes you have the nix package manager available with flakes enabled.
- Loading branch information
Showing
2 changed files
with
183 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
description = "Application packaged using poetry2nix"; | ||
|
||
inputs.flake-utils.url = "github:numtide/flake-utils"; | ||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
inputs.poetry2nix = { | ||
url = "github:nix-community/poetry2nix"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils, poetry2nix }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
# see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples. | ||
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication; | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
|
||
in | ||
{ | ||
packages = { | ||
myapp = mkPoetryApplication { | ||
projectDir = self; | ||
nativeBuildInputs = [ | ||
pkgs.python3.pkgs.cffi | ||
]; | ||
propagatedBuildInputs = with pkgs; [ | ||
gpgme | ||
pkgs.gpgme.dev | ||
pkgs.python3.pkgs.cffi | ||
]; | ||
overrides = poetry2nix.legacyPackages.${system}.overrides.withDefaults (self: super: { | ||
gpg = super.gpgme; | ||
notmuch2 = pkgs.python3.pkgs.notmuch2; | ||
}); | ||
|
||
}; | ||
default = self.packages.${system}.myapp; | ||
}; | ||
|
||
devShells.default = pkgs.mkShell { | ||
packages = [ poetry2nix.packages.${system}.poetry ]; | ||
}; | ||
|
||
}); | ||
} |