feat: add vuescan
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
2188eaaa7d
commit
cf757f1df4
2 changed files with 68 additions and 6 deletions
60
hosts/common/optional/vuescan.nix
Normal file
60
hosts/common/optional/vuescan.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
fetchurl,
|
||||||
|
gnutar,
|
||||||
|
autoPatchelfHook,
|
||||||
|
glibc,
|
||||||
|
gtk2,
|
||||||
|
xorg,
|
||||||
|
libgudev,
|
||||||
|
makeDesktopItem,
|
||||||
|
}: let
|
||||||
|
pname = "vuescan";
|
||||||
|
version = "9.8.36";
|
||||||
|
desktopItem = makeDesktopItem {
|
||||||
|
name = "VueScan";
|
||||||
|
desktopName = "VueScan";
|
||||||
|
genericName = "Scanning Program";
|
||||||
|
comment = "Scanning Program";
|
||||||
|
icon = "vuescan";
|
||||||
|
terminal = false;
|
||||||
|
type = "Application";
|
||||||
|
startupNotify = true;
|
||||||
|
categories = ["Graphics" "Utility"];
|
||||||
|
keywords = ["scan" "scanner"];
|
||||||
|
|
||||||
|
exec = "vuescan";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://www.hamrick.com/files/vuex6498.tgz";
|
||||||
|
hash = "sha256-JomNwzGP68vRz2H+xutGkkMxH6WJ5DS7s06vU0rei/E=";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Stripping breaks the program
|
||||||
|
dontStrip = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [gnutar autoPatchelfHook];
|
||||||
|
|
||||||
|
buildInputs = [glibc gtk2 xorg.libSM libgudev];
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
tar xfz $src
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
install -m755 -D VueScan/vuescan $out/bin/vuescan
|
||||||
|
|
||||||
|
mkdir -p $out/share/icons/hicolor/scalable/apps/
|
||||||
|
cp VueScan/vuescan.svg $out/share/icons/hicolor/scalable/apps/vuescan.svg
|
||||||
|
|
||||||
|
mkdir -p $out/lib/udev/rules.d/
|
||||||
|
cp VueScan/vuescan.rul $out/lib/udev/rules.d/60-vuescan.rules
|
||||||
|
|
||||||
|
mkdir -p $out/share/applications/
|
||||||
|
ln -s ${desktopItem}/share/applications/* $out/share/applications
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ config, pkgs, ... }:
|
{pkgs, ...}: let
|
||||||
|
vuescan = pkgs.callPackage ../common/optional/vuescan.nix {};
|
||||||
{
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
|
|
@ -58,17 +58,19 @@
|
||||||
awscli2
|
awscli2
|
||||||
libreoffice
|
libreoffice
|
||||||
x32edit
|
x32edit
|
||||||
|
vuescan
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
services.udev.packages = [vuescan];
|
||||||
|
|
||||||
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
services.printing.drivers = [ pkgs.brlaser ];
|
services.printing.drivers = [pkgs.brlaser];
|
||||||
|
|
||||||
hardware.sane.enable = true;
|
hardware.sane.enable = true;
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue