mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
571c71e6f7
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.
51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub
|
|
, makeWrapper, installShellFiles
|
|
, python3, sqlite
|
|
, nixosTests
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "tuptime";
|
|
version = "5.2.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rfmoz";
|
|
repo = "tuptime";
|
|
rev = version;
|
|
sha256 = "sha256-pYGtgv9hPBG/URD2nOWg6qJYYLtlqLW+t5mCLpzKlEc=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
install -m 755 $src/src/tuptime $out/bin/
|
|
|
|
installManPage $src/src/man/tuptime.1
|
|
|
|
install -Dm 0755 $src/misc/scripts/db-tuptime-migrate-4.0-to-5.0.sh \
|
|
$out/share/tuptime/db-tuptime-migrate-4.0-to-5.0.sh
|
|
'';
|
|
|
|
preFixup = ''
|
|
wrapProgram $out/share/tuptime/db-tuptime-migrate-4.0-to-5.0.sh \
|
|
--prefix PATH : "${lib.makeBinPath [ sqlite ]}"
|
|
'';
|
|
|
|
passthru.tests = nixosTests.tuptime;
|
|
|
|
meta = with lib; {
|
|
description = "Total uptime & downtime statistics utility";
|
|
homepage = "https://github.com/rfrail3/tuptime";
|
|
changelog = "https://github.com/rfrail3/tuptime/blob/master/CHANGELOG";
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.all;
|
|
maintainers = [ maintainers.evils ];
|
|
mainProgram = "tuptime";
|
|
};
|
|
}
|