Skip to content

Commit df5ec05

Browse files
oclock: refactor & move to pkgs/by-name from xorg namespace
1 parent 6bcc228 commit df5ec05

File tree

5 files changed

+62
-49
lines changed

5 files changed

+62
-49
lines changed

pkgs/by-name/oc/oclock/package.nix

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchurl,
5+
pkg-config,
6+
libxkbfile,
7+
libx11,
8+
libxext,
9+
libxmu,
10+
libxt,
11+
writeScript,
12+
}:
13+
stdenv.mkDerivation (finalAttrs: {
14+
pname = "oclock";
15+
version = "1.0.6";
16+
17+
src = fetchurl {
18+
url = "mirror://xorg/individual/app/oclock-${finalAttrs.version}.tar.xz";
19+
hash = "sha256-PuheXi0hHsp724sv4OO68xmYgpr0gZi1+pu+4qoNJL4=";
20+
};
21+
22+
strictDeps = true;
23+
24+
nativeBuildInputs = [ pkg-config ];
25+
26+
buildInputs = [
27+
libxkbfile
28+
libx11
29+
libxext
30+
libxmu
31+
libxt
32+
];
33+
34+
installFlags = [ "appdefaultdir=$(out)/share/X11/app-defaults" ];
35+
36+
passthru = {
37+
updateScript = writeScript "update-${finalAttrs.pname}" ''
38+
#!/usr/bin/env nix-shell
39+
#!nix-shell -i bash -p common-updater-scripts
40+
version="$(list-directory-versions --pname ${finalAttrs.pname} \
41+
--url https://xorg.freedesktop.org/releases/individual/app/ \
42+
| sort -V | tail -n1)"
43+
update-source-version ${finalAttrs.pname} "$version"
44+
'';
45+
};
46+
47+
meta = {
48+
description = "simple analog clock using the X11 SHAPE extension to make a round window";
49+
homepage = "https://gitlab.freedesktop.org/xorg/app/oclock";
50+
license = with lib.licenses; [
51+
mitOpenGroup
52+
x11
53+
];
54+
mainProgram = "oclock";
55+
maintainers = [ ];
56+
platforms = lib.platforms.unix;
57+
};
58+
})

pkgs/servers/x11/xorg/default.nix

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
luit,
102102
makedepend,
103103
mkfontscale,
104+
oclock,
104105
pixman,
105106
sessreg,
106107
smproxy,
@@ -178,6 +179,7 @@ self: with self; {
178179
luit
179180
makedepend
180181
mkfontscale
182+
oclock
181183
pixman
182184
sessreg
183185
smproxy
@@ -350,52 +352,6 @@ self: with self; {
350352
})
351353
) { };
352354

353-
# THIS IS A GENERATED FILE. DO NOT EDIT!
354-
oclock = callPackage (
355-
{
356-
stdenv,
357-
pkg-config,
358-
fetchurl,
359-
libxkbfile,
360-
libX11,
361-
libXext,
362-
libXmu,
363-
libXt,
364-
wrapWithXFileSearchPathHook,
365-
testers,
366-
}:
367-
stdenv.mkDerivation (finalAttrs: {
368-
pname = "oclock";
369-
version = "1.0.6";
370-
builder = ./builder.sh;
371-
src = fetchurl {
372-
url = "mirror://xorg/individual/app/oclock-1.0.6.tar.xz";
373-
sha256 = "1gi41nmf5glvzasri0glka19h6gkpbiy0bwbvdxwl7i15mg5xs1y";
374-
};
375-
hardeningDisable = [
376-
"bindnow"
377-
"relro"
378-
];
379-
strictDeps = true;
380-
nativeBuildInputs = [
381-
pkg-config
382-
wrapWithXFileSearchPathHook
383-
];
384-
buildInputs = [
385-
libxkbfile
386-
libX11
387-
libXext
388-
libXmu
389-
libXt
390-
];
391-
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
392-
meta = {
393-
pkgConfigModules = [ ];
394-
platforms = lib.platforms.unix;
395-
};
396-
})
397-
) { };
398-
399355
# THIS IS A GENERATED FILE. DO NOT EDIT!
400356
setxkbmap = callPackage (
401357
{

pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@
432432
luit,
433433
makedepend,
434434
mkfontscale,
435+
oclock,
435436
pixman,
436437
sessreg,
437438
smproxy,
@@ -509,6 +510,7 @@
509510
luit
510511
makedepend
511512
mkfontscale
513+
oclock
512514
pixman
513515
sessreg
514516
smproxy

pkgs/servers/x11/xorg/overrides.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ self: super:
158158
};
159159
});
160160

161-
oclock = addMainProgram super.oclock { };
162-
163161
xf86inputevdev = super.xf86inputevdev.overrideAttrs (attrs: {
164162
outputs = [
165163
"out"

pkgs/servers/x11/xorg/tarballs.list

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
mirror://xorg/individual/app/oclock-1.0.6.tar.xz
21
mirror://xorg/individual/app/setxkbmap-1.3.4.tar.xz
32
mirror://xorg/individual/app/xclock-1.1.1.tar.xz
43
mirror://xorg/individual/app/xdm-1.1.17.tar.xz

0 commit comments

Comments
 (0)