Skip to content

Commit

Permalink
add flake
Browse files Browse the repository at this point in the history
  • Loading branch information
makemake-kbo committed Mar 27, 2024
1 parent 710639e commit 4d368d6
Show file tree
Hide file tree
Showing 3 changed files with 206 additions and 0 deletions.
Empty file added app/__init__.py
Empty file.
175 changes: 175 additions & 0 deletions flake.lock

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

31 changes: 31 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
description = "Hrotti - Mock an ethereum node";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
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.
pkgs = nixpkgs.legacyPackages.${system};
inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication;
in
{
packages = {
myapp = mkPoetryApplication { projectDir = self; };
default = self.packages.${system}.myapp;
};

devShells.default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.myapp ];
packages = [ pkgs.poetry ];
};
});
}

0 comments on commit 4d368d6

Please sign in to comment.