Init repo

This commit is contained in:
2026-01-08 20:48:45 +01:00
commit c96794378a
9 changed files with 234 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
result

33
concraft-pl/default.nix Normal file
View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
fetchzip,
autoPatchelfHook,
libgcc,
zlib,
gmp,
...
}:
stdenv.mkDerivation {
pname = "concraft-pl";
version = "2020-05-13";
src = fetchzip {
url = "https://zil.ipipan.waw.pl/Concraft?action=AttachFile&do=get&target=Concraft-Linux.zip";
hash = "sha256-7CxCwaSgi8wIKxoaaMMT8DRApJj6eGsvgr0s6/YXn6g=";
};
buildInputs = [
autoPatchelfHook
gmp
zlib
libgcc
stdenv.cc.cc.lib
];
installPhase = ''
mkdir -p "$out/bin";
install -Dm 755 concraft-pl $out/bin;
'';
}

View File

View File

@@ -0,0 +1,6 @@
import morfeusz2
def main():
morf = morfeusz2.Morfeusz()
analysis = morf.analyse('Ala ma kota.')
for i, j, interp in analysis:
print(i, j, interp)

51
conmorfeusz/default.nix Normal file
View File

@@ -0,0 +1,51 @@
{
pkgs,
fetchurl,
libgcc,
stdenv,
autoPatchelfHook,
...
}: let
python = pkgs.python311; # Możesz zmienić wersję Python
pythonPackages = python.pkgs;
morfeusz2 = pythonPackages.buildPythonPackage rec {
pname = "morfeusz2";
version = "1.99.12";
src = fetchurl {
url = "https://files.pythonhosted.org/packages/08/d6/af24fb23423ffb404b601ef75da20a7339b40e2e3992cd0213db9ab0b889/morfeusz2-1.99.12-cp36-abi3-manylinux_2_28_x86_64.whl";
hash = "sha256-wxFwDiRQ4g5FhMmEHf9450Jh3BeB14BXxgsNjv/o0Ac=";
};
format = "wheel";
propagatedBuildInputs = with pythonPackages; [
setuptools
wheel
];
nativeBuildInputs = with pythonPackages; [
libgcc
stdenv.cc.cc.lib
autoPatchelfHook
];
};
in
pythonPackages.buildPythonPackage rec {
pname = "conmorfeusz";
version = "0.1.0";
src = ./.;
pyproject = true;
propagatedBuildInputs = with pythonPackages; [
morfeusz2
];
nativeBuildInputs = with pythonPackages; [
setuptools
wheel
];
}

View File

@@ -0,0 +1,19 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "conmorfeusz"
version = "0.1.0"
description = "Connects Morfeusz and Concraft-pl glued together"
requires-python = "==3.6"
dependencies = [
"morfeusz2==1.99.12"
]
[tool.setuptools]
packages = ["conmorfeusz"]
[project.scripts]
conmorfeusz = "conmorfeusz.main:main"

61
flake.lock generated Normal file
View File

@@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1767767207,
"narHash": "sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5912c1772a44e31bf1c63c0390b90501e5026886",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

31
flake.nix Normal file
View File

@@ -0,0 +1,31 @@
{
description = "Flake which provides a Conmorfeusz (app that glues Morfeusz and Concraft-pl together) as well as Morfeusz and Concraft-pl";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
conmorfeusz = pkgs.callPackage ./conmorfeusz {inherit self;};
morfeusz = pkgs.callPackage ./morfeusz {inherit self;};
concraft-pl = pkgs.callPackage ./concraft-pl {inherit self;};
in {
packages = rec {
inherit conmorfeusz morfeusz concraft-pl;
default = conmorfeusz;
};
# Aplikacje do uruchomienia
apps.default = flake-utils.lib.mkApp {
drv = conmorfeusz;
name = "conmorfeusz"; # Nazwa skryptu/modułu do uruchomienia
};
});
}

32
morfeusz/default.nix Normal file
View File

@@ -0,0 +1,32 @@
{
pkgs,
lib,
stdenv,
autoPatchelfHook,
libgcc,
...
}:
stdenv.mkDerivation {
pname = "morfeusz";
version = "2025.11.16";
src = builtins.fetchTarball {
url = "http://download.sgjp.pl/morfeusz/20251116/Linux/manylinux_2_28/64/morfeusz2-1.99.12.sgjp.20251116-Linux-amd64.tar.gz";
sha256 = "sha256:09dya2pjbvh9i8d7fgcl4hgmmf9x3vwgiq7fm3n5b4c8ic495wgh";
};
buildInputs = [
autoPatchelfHook
libgcc
stdenv.cc.cc.lib
];
installPhase = ''
mkdir -p $out/{bin,lib,include};
install -Dm 755 $src/bin/* $out/bin/;
install -Dm 755 $src/lib/* $out/lib/;
install -Dm 755 $src/include/* $out/include/;
'';
}