Compare commits
3 commits
c53d67a788
...
1f9c599c40
Author | SHA1 | Date | |
---|---|---|---|
1f9c599c40 | |||
a414e85e51 | |||
f23cbdf69c |
5 changed files with 97 additions and 21 deletions
36
flake.lock
generated
36
flake.lock
generated
|
@ -110,11 +110,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750730235,
|
||||
"narHash": "sha256-rZErlxiV7ssvI8t7sPrKU+fRigNc2KvoKZG3gtUtK50=",
|
||||
"lastModified": 1752286566,
|
||||
"narHash": "sha256-A4nftqiNz2bNihz0bKY94Hq/6ydR6UQOcGioeL7iymY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d07e9cceb4994ed64a22b9b36f8b76923e87ac38",
|
||||
"rev": "392ddb642abec771d63688c49fa7bcbb9d2a5717",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -160,11 +160,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1747663185,
|
||||
"narHash": "sha256-Obh50J+O9jhUM/FgXtI3he/QRNiV9+J53+l+RlKSaAk=",
|
||||
"lastModified": 1751903740,
|
||||
"narHash": "sha256-PeSkNMvkpEvts+9DjFiop1iT2JuBpyknmBUs0Un0a4I=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "ee07ba0d36c38e9915c55d2ac5a8fb0f05f2afcc",
|
||||
"rev": "032decf9db65efed428afd2fa39d80f7089085eb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -175,11 +175,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1750431636,
|
||||
"narHash": "sha256-vnzzBDbCGvInmfn2ijC4HsIY/3W1CWbwS/YQoFgdgPg=",
|
||||
"lastModified": 1752048960,
|
||||
"narHash": "sha256-gATnkOe37eeVwKKYCsL+OnS2gU4MmLuZFzzWCtaKLI8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "1552a9f4513f3f0ceedcf90320e48d3d47165712",
|
||||
"rev": "7ced9122cff2163c6a0212b8d1ec8c33a1660806",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -191,11 +191,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1750506804,
|
||||
"narHash": "sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc=",
|
||||
"lastModified": 1751984180,
|
||||
"narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4206c4cb56751df534751b058295ea61357bbbaa",
|
||||
"rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -207,11 +207,11 @@
|
|||
},
|
||||
"nixpkgs-small": {
|
||||
"locked": {
|
||||
"lastModified": 1750752886,
|
||||
"narHash": "sha256-pP1ZBxEo44HbLDyXVPPK8BQO882eGKpW9zzXliGFA/8=",
|
||||
"lastModified": 1752298176,
|
||||
"narHash": "sha256-wY7/8k5mJbljXxBUX1bDHFVUcMrWdrDT8FNDrcPwLbA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "83685a4ccd44d2d4c09f2e5f7773d2f3f2156121",
|
||||
"rev": "d3807bc34e7d086b4754e1c842505570e23f9d01",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -274,11 +274,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749194973,
|
||||
"narHash": "sha256-eEy8cuS0mZ2j/r/FE0/LYBSBcIs/MKOIVakwHVuqTfk=",
|
||||
"lastModified": 1752055615,
|
||||
"narHash": "sha256-19m7P4O/Aw/6+CzncWMAJu89JaKeMh3aMle1CNQSIwM=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "a05be418a1af1198ca0f63facb13c985db4cb3c5",
|
||||
"rev": "c9d477b5d5bd7f26adddd3f96cfd6a904768d4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -128,6 +128,7 @@ in
|
|||
enable = true;
|
||||
browsing = true;
|
||||
drivers = with pkgs; [
|
||||
config.dadada.pkgs.citizen-cups
|
||||
hplip
|
||||
brlaser
|
||||
brgenml1lpr
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ cfg, pkgs, ... }:
|
||||
{
|
||||
hardware = {
|
||||
printers = {
|
||||
|
@ -29,7 +29,10 @@
|
|||
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.brlaser ];
|
||||
drivers = [
|
||||
pkgs.brlaser
|
||||
pkgs.gutenprint
|
||||
];
|
||||
# Remove all state at the start of the service
|
||||
stateless = true;
|
||||
listenAddresses = [ "192.168.101.29:631" ];
|
||||
|
|
70
pkgs/citizen-cups.nix
Normal file
70
pkgs/citizen-cups.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
cups,
|
||||
fetchzip,
|
||||
lib,
|
||||
stdenv,
|
||||
rpm,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.2.8";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit version;
|
||||
name = "citizen-cups";
|
||||
pname = "citizen-cups";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://www.citizen-systems.com/resource/support/POS/Generic_Printer_Files/CUPS_Linux_Driver/CUPS_Linux_Driver.zip";
|
||||
hash = "sha256-2ha24/7oS/rINKmYxyVryX66kkc6niCChxhw/2KOPSw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
rpm
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cups
|
||||
];
|
||||
|
||||
postUnpack = ''
|
||||
pushd source
|
||||
ls -la
|
||||
rpm2archive ctzpos-cups-1.2.8-0.src.rpm
|
||||
tar xvf ctzpos-cups-1.2.8-0.src.rpm.tgz
|
||||
tar xvf ctzpos-cups-1.2.8.tar.bz2
|
||||
popd
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
pushd "ctzpos-cups-${version}";
|
||||
gcc -Wl,-rpath,/usr/lib -Wall -fPIC -O2 -o rastertocbm1k rastertocbm1k.c -lcupsimage -lcups
|
||||
gcc -Wl,-rpath,/usr/lib -Wall -fPIC -O2 -o rastertocds500 rastertocds500.c -lcupsimage -lcups
|
||||
gcc -Wl,-rpath,/usr/lib -Wall -fPIC -O2 -o rastertocts2kl rastertocts2kl.c -lcupsimage -lcups
|
||||
popd
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib/cups/filter
|
||||
install -D -m 755 ./ctzpos-cups-${version}/rastertocbm1k $out/lib/cups/filter/rastertocbm1k
|
||||
install -D -m 755 ./ctzpos-cups-${version}/rastertocds500 $out/lib/cups/filter/rastertocds500
|
||||
install -D -m 755 ./ctzpos-cups-${version}/rastertocts2kl $out/lib/cups/filter/rastertocts2kl
|
||||
|
||||
mkdir -p $out/share/cups/model/citizen
|
||||
install -D -m 644 ./ctzpos-cups-${version}/*.ppd $out/share/cups/model/citizen
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Citizen CUPS drivers and filters";
|
||||
homepage = "https://www.citizen-systems.com";
|
||||
#license = licenses.unfreeRedistributable;
|
||||
maintainers = with maintainers; [ dadada ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -1 +1,3 @@
|
|||
{ pkgs }: { }
|
||||
{ pkgs }: {
|
||||
citizen-cups = pkgs.callPackage ./citizen-cups.nix {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue