Skip to content

Commit

Permalink
Working example of packaging pretalx using poetry2nix.mkPoetryApplica…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
imincik committed Aug 1, 2023
1 parent f7b826a commit e9581f3
Show file tree
Hide file tree
Showing 3 changed files with 453 additions and 141 deletions.
48 changes: 34 additions & 14 deletions pkgs/pretalx/default.nix
Original file line number Diff line number Diff line change
@@ -1,25 +1,45 @@
{
lib,
python3,
pkgs,

fetchFromGitHub,

poetry2nix
}: let

pname = "pretalx";
version = "v2.3.2";
pretalxSrc = pkgs.fetchFromGitHub {

pretalxSrc = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "1af365afb160f1fa2e15905a14a897145dcbd65e";
hash = "sha256-rHWrkE2020+7YgE1YYiMSwJEaGGoqDnyDKTW7Qf3p58=";
};
in
pretalxSrc
# in (pkgs.poetry2nix.mkPoetryApplication {
# projectDir = pretalxSrc;
# meta = with lib; {
# description = pname;
# homepage = "https://example.com";
# license = licenses.unlicense;
# maintainers = [];
# };
# })

pyprojectFile = ./pyproject.toml;
poetryLockFile = ./poetry.lock;
# in pretalxSrc

in (
poetry2nix.mkPoetryApplication {
projectDir = ./.;
src = pretalxSrc;
pyproject = ./pyproject.toml;
poetrylock = ./poetry.lock;

patchPhase = ''
rm pyproject.toml
rm setup.py
cp ${pyprojectFile} pyproject.toml
cp ${poetryLockFile} poetry.lock
'';

meta = with lib; {
description = pname;
homepage = "https://example.com";
license = licenses.unlicense;
maintainers = [];
};
})

Loading

0 comments on commit e9581f3

Please sign in to comment.