Skip to content

Commit

Permalink
Merge pull request #1624 from teto/flake
Browse files Browse the repository at this point in the history
add a nix flake
  • Loading branch information
lucc committed Aug 19, 2023
2 parents 7136092 + 67ca49a commit 50fcd10
Show file tree
Hide file tree
Showing 2 changed files with 178 additions and 0 deletions.
138 changes: 138 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
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 = {
alot = 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 (final: prev: {
gpg = prev.gpgme;
notmuch2 = pkgs.python3.pkgs.notmuch2;
});

};
default = self.packages.${system}.alot;
};
});
}

0 comments on commit 50fcd10

Please sign in to comment.