Created
April 11, 2025 07:39
-
-
Save aforemny/dd4433112863c6a08e2435a58ec78668 to your computer and use it in GitHub Desktop.
Sephrasto nixpkgs
This file contains hidden or 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
{ pkgs ? import <nixpkgs> { } }: | |
pkgs.callPackage | |
({ stdenv | |
, fetchFromGitHub | |
, python3 | |
, python3Packages | |
}: | |
stdenv.mkDerivation (finalAttrs: { | |
pname = "Sephrasto"; | |
version = "5.1.0"; | |
src = fetchFromGitHub { | |
owner = "Aeolitus"; | |
repo = "Sephrasto"; | |
rev = "refs/tags/v${finalAttrs.version}"; | |
hash = "sha256-FrDc018UmDCREXNV8dfZ6kajjkiqrpRP7e2HLhGJqnM="; | |
}; | |
patchPhase = '' | |
sed -i 's@"sephrasto.log"@"/var/tmp/sephrasto.log"@' src/Sephrasto/Sephrasto.py | |
''; | |
installPhase = '' | |
mkdir -p $out/bin $out/share/Sephrasto | |
cp -a . $out/share/Sephrasto | |
cat >$out/bin/Sephrasto <<EOF | |
set -efux | |
exec ${(python3.buildEnv.override { | |
extraLibs = with python3Packages; [ lxml pyside6 pyyaml restrictedpython ]; | |
}).interpreter} $out/share/Sephrasto/src/Sephrasto/Sephrasto.py "\$@" | |
EOF | |
chmod +x $out/bin/Sephrasto | |
''; | |
})) | |
{ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment