mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 10:23:29 +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.
44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl }:
|
|
let
|
|
db = fetchurl {
|
|
url = "mirror://savannah/hddtemp/hddtemp.db";
|
|
sha256 = "1fr6qgns6qv7cr40lic5yqwkkc7yjmmgx8j0z6d93csg3smzhhya";
|
|
};
|
|
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "hddtemp";
|
|
version = "0.3-beta15";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://savannah/hddtemp/hddtemp-${version}.tar.bz2";
|
|
sha256 = "sha256-YYVBWEBUCT1TvootnoHJcXTzDwCvkcuHAKl+RC1571s=";
|
|
};
|
|
|
|
# from Gentoo
|
|
patches = [ ./byteswap.patch ./dontwake.patch ./execinfo.patch ./satacmds.patch ];
|
|
|
|
configureFlags = [
|
|
"--with-db-path=${placeholder "out"}/share/hddtemp/hddtemp.db"
|
|
];
|
|
|
|
env = lib.optionalAttrs stdenv.cc.isGNU {
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
|
|
};
|
|
|
|
postInstall = ''
|
|
install -Dm444 ${db} $out/share/hddtemp/hddtemp.db
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = with lib; {
|
|
description = "Tool for displaying hard disk temperature";
|
|
homepage = "https://savannah.nongnu.org/projects/hddtemp/";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
platforms = platforms.linux;
|
|
mainProgram = "hddtemp";
|
|
};
|
|
}
|