nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ fetchFromGitHub, lib, stdenv }:
2
3stdenv.mkDerivation rec {
4 pname = "digitemp";
5 version = "3.7.2";
6
7 src = fetchFromGitHub {
8 owner = "bcl";
9 repo = "digitemp";
10 rev = "v${version}";
11 sha256 = "19zka5fcdxhhginaspak76l984iqq9v2j6qrwvi5mvca7bcj8f72";
12 };
13
14 enableParallelBuilding = true;
15
16 makeFlags = [
17 "LOCK=no"
18 "ds9097"
19 "ds9097u"
20 ];
21
22 installPhase = ''
23 runHook preInstall
24 install -D -m555 -t $out/bin digitemp_*
25 install -D -m444 -t $out/share/doc/${pname} FAQ README
26 runHook postInstall
27 '';
28
29 meta = with lib; {
30 description = "Temperature logging and reporting using Maxim's iButtons and 1-Wire protocol";
31 longDescription = ''
32 DigiTemp is a command line application used for reading 1-wire sensors like
33 the DS18S20 temperature sensor, or DS2438 battery monitor. DigiTemp supports
34 the following devices:
35
36 DS18S20 (and older DS1820) Temperature Sensor
37 DS18B20 Temperature Sensor
38 DS1822 Temperature Sensor
39 DS2438 Battery monitor
40 DS2409 1-wire coupler (used in 1-wire hubs)
41 DS2422 Counter
42 DS2423 Counter
43
44 The output format can be customized and all settings are stored in a
45 configuration file (.digitemprc) in the current directory. DigiTemp can
46 repeatedly read the sensors and output to stdout and/or to a logfile.
47 '';
48 homepage = "https://www.digitemp.com";
49 license = licenses.gpl2Plus;
50 maintainers = [ ];
51 platforms = platforms.unix;
52 };
53}