nixpkgs/pkgs/by-name/xd/xdaliclock/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

48 lines
1.3 KiB
Nix

{ lib, stdenv, fetchurl
, gtk3
, wrapGAppsHook3
, pkg-config }:
stdenv.mkDerivation rec {
pname = "xdaliclock";
version = "2.48";
src = fetchurl {
url = "https://www.jwz.org/xdaliclock/xdaliclock-${version}.tar.gz";
hash = "sha256-BZiqjTSSAgvT/56OJDcKh4pDP9uqVhR5cCx89H+5FLQ=";
};
# Note: don't change this to set sourceRoot, or updateAutotoolsGnuConfigScriptsHook
# on aarch64 doesn't find the files to patch and the aarch64 build fails!
preConfigure = "cd X11";
nativeBuildInputs = [
pkg-config
wrapGAppsHook3
];
buildInputs = [
gtk3
];
preInstall = ''
mkdir -vp $out/bin $out/share/man/man1 $out/share/gsettings-schemas/$name/glib-2.0/schemas $out/share/pixmaps $out/share/applications
# https://www.jwz.org/blog/2022/08/dali-clock-2-45-released/#comment-236762
gappsWrapperArgs+=(--set MESA_GL_VERSION_OVERRIDE 3.1)
'';
installFlags = [
"GTK_ICONDIR=${placeholder "out"}/share/pixmaps/"
"GTK_APPDIR=${placeholder "out"}/share/applications/"
];
meta = with lib; {
description = "Clock application that morphs digits when they are changed";
maintainers = with maintainers; [ raskin ];
platforms = with platforms; linux ++ freebsd;
license = licenses.free; #TODO BSD on Gentoo, looks like MIT
downloadPage = "http://www.jwz.org/xdaliclock/";
mainProgram = "xdaliclock";
};
}