Created
January 12, 2024 14:38
-
-
Save hauleth/100dd434162732311510fad5699688e8 to your computer and use it in GitHub Desktop.
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
{ | |
"nodes": { | |
"flake-utils": { | |
"inputs": { | |
"systems": "systems" | |
}, | |
"locked": { | |
"lastModified": 1694529238, | |
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", | |
"owner": "numtide", | |
"repo": "flake-utils", | |
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384", | |
"type": "github" | |
}, | |
"original": { | |
"owner": "numtide", | |
"repo": "flake-utils", | |
"type": "github" | |
} | |
}, | |
"nix-github-actions": { | |
"inputs": { | |
"nixpkgs": [ | |
"poetry2nix", | |
"nixpkgs" | |
] | |
}, | |
"locked": { | |
"lastModified": 1698974481, | |
"narHash": "sha256-yPncV9Ohdz1zPZxYHQf47S8S0VrnhV7nNhCawY46hDA=", | |
"owner": "nix-community", | |
"repo": "nix-github-actions", | |
"rev": "4bb5e752616262457bc7ca5882192a564c0472d2", | |
"type": "github" | |
}, | |
"original": { | |
"owner": "nix-community", | |
"repo": "nix-github-actions", | |
"type": "github" | |
} | |
}, | |
"nixpkgs": { | |
"locked": { | |
"lastModified": 1704842529, | |
"narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=", | |
"path": "/nix/store/g16z4fs1mrbkxc4x6wm8xbrh13nc7aw4-source", | |
"rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5", | |
"type": "path" | |
}, | |
"original": { | |
"id": "nixpkgs", | |
"type": "indirect" | |
} | |
}, | |
"poetry2nix": { | |
"inputs": { | |
"flake-utils": "flake-utils", | |
"nix-github-actions": "nix-github-actions", | |
"nixpkgs": [ | |
"nixpkgs" | |
], | |
"systems": "systems_2", | |
"treefmt-nix": "treefmt-nix" | |
}, | |
"locked": { | |
"lastModified": 1705060653, | |
"narHash": "sha256-puYyylgrBS4AFAHeyVRTjTUVD8DZdecJfymWJe7H438=", | |
"owner": "nix-community", | |
"repo": "poetry2nix", | |
"rev": "e0b44e9e2d3aa855d1dd77b06f067cd0e0c3860d", | |
"type": "github" | |
}, | |
"original": { | |
"owner": "nix-community", | |
"repo": "poetry2nix", | |
"type": "github" | |
} | |
}, | |
"root": { | |
"inputs": { | |
"nixpkgs": "nixpkgs", | |
"poetry2nix": "poetry2nix" | |
} | |
}, | |
"systems": { | |
"locked": { | |
"lastModified": 1681028828, | |
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", | |
"owner": "nix-systems", | |
"repo": "default", | |
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", | |
"type": "github" | |
}, | |
"original": { | |
"owner": "nix-systems", | |
"repo": "default", | |
"type": "github" | |
} | |
}, | |
"systems_2": { | |
"locked": { | |
"lastModified": 1681028828, | |
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", | |
"owner": "nix-systems", | |
"repo": "default", | |
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", | |
"type": "github" | |
}, | |
"original": { | |
"id": "systems", | |
"type": "indirect" | |
} | |
}, | |
"treefmt-nix": { | |
"inputs": { | |
"nixpkgs": [ | |
"poetry2nix", | |
"nixpkgs" | |
] | |
}, | |
"locked": { | |
"lastModified": 1699786194, | |
"narHash": "sha256-3h3EH1FXQkIeAuzaWB+nK0XK54uSD46pp+dMD3gAcB4=", | |
"owner": "numtide", | |
"repo": "treefmt-nix", | |
"rev": "e82f32aa7f06bbbd56d7b12186d555223dc399d1", | |
"type": "github" | |
}, | |
"original": { | |
"owner": "numtide", | |
"repo": "treefmt-nix", | |
"type": "github" | |
} | |
} | |
}, | |
"root": "root", | |
"version": 7 | |
} |
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
{ | |
inputs.poetry2nix = { | |
url = "github:nix-community/poetry2nix"; | |
inputs.nixpkgs.follows = "nixpkgs"; | |
}; | |
outputs = { | |
self, | |
nixpkgs, | |
poetry2nix, | |
}: let | |
system = "aarch64-darwin"; | |
pkgs = import nixpkgs {inherit system;}; | |
inherit (poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}) mkPoetryApplication; | |
src = pkgs.fetchFromGitHub { | |
owner = "tfeldmann"; | |
repo = "organize"; | |
rev = "v3.0.0"; | |
hash = "sha256-N0sHk0mKFG0XW4eJ7qyjzZsou9fFdDuPON9xnCBRg5Y="; | |
}; | |
in { | |
formatter.${system} = pkgs.alejandra; | |
packages.${system} = { | |
default = let | |
organize-tool = { | |
lib, | |
python3, | |
fetchFromGitHub, | |
}: let | |
ps = python3.pkgs; | |
in | |
ps.buildPythonApplication rec { | |
pname = "organize-tool"; | |
version = "3.0.0"; | |
format = "pyproject"; | |
pythonRelaxDeps = [ | |
"PyYAML" | |
]; | |
nativeBuildInputs = [ | |
ps.poetry-core | |
]; | |
propagatedBuildInputs = [ | |
ps.pyyaml | |
ps.pydantic | |
ps.rich | |
]; | |
inherit src; | |
meta = { | |
mainProgram = "organize"; | |
}; | |
}; | |
in | |
pkgs.callPackage organize-tool {}; | |
poetry = let | |
organize-tool = {}: | |
mkPoetryApplication { | |
projectDir = src; | |
}; | |
in | |
pkgs.callPackage organize-tool {}; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment