xcalc: refactor and move to pkgs/by-name from xorg namespace

This commit is contained in:
quantenzitrone
2025-09-24 18:28:35 +02:00
parent 4cc11e6806
commit 69c34bfba4
5 changed files with 64 additions and 47 deletions
+60
View File
@@ -0,0 +1,60 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
xorgproto,
wrapWithXFileSearchPathHook,
libx11,
libxaw,
libxt,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xcalc";
version = "1.1.2";
src = fetchurl {
url = "mirror://xorg/individual/app/xcalc-${finalAttrs.version}.tar.xz";
hash = "sha256-hXjfoUV+lCifbW7WFGcUMH2Kc6G1TS9CrxMhtiX8HNQ=";
};
strictDeps = true;
nativeBuildInputs = [
pkg-config
wrapWithXFileSearchPathHook
];
buildInputs = [
xorgproto
libx11
libxaw
libxt
];
installFlags = [ "appdefaultdir=$(out)/share/X11/app-defaults" ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname ${finalAttrs.pname} \
--url https://xorg.freedesktop.org/releases/individual/app/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "Scientific calculator X11 client that can emulate a TI-30 or an HP-10C";
homepage = "https://gitlab.freedesktop.org/xorg/app/xcalc";
license = with lib.licenses; [
x11
hpndSellVariant
];
mainProgram = "xcalc";
maintainers = [ ];
platforms = lib.platforms.unix;
};
})
+2 -44
View File
@@ -92,6 +92,7 @@
xauth,
xbacklight,
xbitmaps,
xcalc,
xcb-proto,
xcmsdb,
xconsole,
@@ -158,6 +159,7 @@ self: with self; {
xauth
xbacklight
xbitmaps
xcalc
xcmsdb
xconsole
xcursorgen
@@ -1215,50 +1217,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
xcalc = callPackage (
{
stdenv,
pkg-config,
fetchurl,
libX11,
libXaw,
xorgproto,
libXt,
wrapWithXFileSearchPathHook,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xcalc";
version = "1.1.2";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/app/xcalc-1.1.2.tar.xz";
sha256 = "1m0wzhjvc88kmx12ykdml5rqlz9h2iki9mkfdngji53y8nhxyy45";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [
pkg-config
wrapWithXFileSearchPathHook
];
buildInputs = [
libX11
libXaw
xorgproto
libXt
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
xclock = callPackage (
{
@@ -419,6 +419,7 @@ print OUT <<EOF;
xauth,
xbacklight,
xbitmaps,
xcalc,
xcb-proto,
xcmsdb,
xconsole,
@@ -485,6 +486,7 @@ self: with self; {
xauth
xbacklight
xbitmaps
xcalc
xcmsdb
xconsole
xcursorgen
-2
View File
@@ -217,8 +217,6 @@ self: super:
oclock = addMainProgram super.oclock { };
xcalc = addMainProgram super.xcalc { };
xf86inputevdev = super.xf86inputevdev.overrideAttrs (attrs: {
outputs = [
"out"
-1
View File
@@ -4,7 +4,6 @@ mirror://xorg/individual/app/fonttosfnt-1.2.4.tar.xz
mirror://xorg/individual/app/iceauth-1.0.10.tar.xz
mirror://xorg/individual/app/oclock-1.0.6.tar.xz
mirror://xorg/individual/app/setxkbmap-1.3.4.tar.xz
mirror://xorg/individual/app/xcalc-1.1.2.tar.xz
mirror://xorg/individual/app/xclock-1.1.1.tar.xz
mirror://xorg/individual/app/xcompmgr-1.1.10.tar.xz
mirror://xorg/individual/app/xdm-1.1.17.tar.xz