Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions pkgs/tools/misc/dpcmd/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ fetchFromGitHub
, lib
, libusb1
, pkg-config
, stdenv
}:

stdenv.mkDerivation rec {
pname = "dpcmd";
version = "1.2";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should I do here if the developers don't specify a version?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set the version to unstable-YYYY-MM-DD; that's what I was told to do for the em100 package.


src = fetchFromGitHub {
rev = "f5646a6fa966f2c2d0e3d7b2d234454fb9d4229a";
owner = "DediProgSW";
repo = "SF100Linux";
sha256 = "0ljqqlzxsp74aci3h0ll59pifjkqskl4vp2898k79b6knb13xhil";
};

nativeBuildInputs = [ pkg-config ];
buildInputs = [ libusb1 ];

installPhase = ''
runHook preInstall

install -Dm755 ./dpcmd $out/bin/dpcmd
install -Dm644 ChipInfoDb.dedicfg $out/share/DediProg/ChipInfoDb.dedicfg

runHook postInstall
'';

meta = with lib; {
homepage = "https://github.com/DediProgSW/SF100Linux";
description = "Linux software for SF100/SF600";
license = licenses.gpl2;
maintainers = with maintainers; [ felixsinger ];
platforms = platforms.linux;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
platforms = platforms.linux;
platforms = platforms.unix;

Is there something about the software that fundamentally cannot work on other unices? I know upstream put "Linux" in the name of the package, but there are no Linux-specific #includes...

Overly-restrictive meta.platforms settings are really annoying to people who don't use x86_64-linux. Nixpkgs shouldn't throw simply because nobody's tried a particular platform/package combination yet...

};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5403,6 +5403,8 @@ with pkgs;

flamerobin = callPackage ../applications/misc/flamerobin { };

dpcmd = callPackage ../tools/misc/dpcmd { };

flashrom = callPackage ../tools/misc/flashrom { };

flent = python3Packages.callPackage ../applications/networking/flent { };
Expand Down