usbrelay: Convert to finalAttrs and remove unused rec

This commit is contained in:
Michal Sojka 2023-06-02 08:21:37 +02:00
parent b1f109dad5
commit bc10438fd7
3 changed files with 6 additions and 6 deletions

View file

@ -5,7 +5,7 @@ in
# This is a separate derivation, not just an additional output of
# usbrelay, because otherwise, we have a cyclic dependency between
# usbrelay (default.nix) and the python module (python.nix).
stdenv.mkDerivation rec {
stdenv.mkDerivation {
pname = "usbrelayd";
inherit (usbrelay) src version;

View file

@ -1,12 +1,12 @@
{ stdenv, lib, fetchFromGitHub, hidapi, installShellFiles }:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "usbrelay";
version = "1.2";
src = fetchFromGitHub {
owner = "darrylb123";
repo = "usbrelay";
rev = version;
rev = finalAttrs.version;
sha256 = "sha256-oJyHzbXOBKxLmPFZMS2jLF80frkiKjPJ89UwkenjIzs=";
};
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
];
makeFlags = [
"DIR_VERSION=${version}"
"DIR_VERSION=${finalAttrs.version}"
"PREFIX=${placeholder "out"}"
"LDCONFIG=${stdenv.cc.libc.bin}/bin/ldconfig"
];
@ -35,4 +35,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ wentasah ];
platforms = platforms.linux;
};
}
})

View file

@ -1,6 +1,6 @@
{ buildPythonPackage, usbrelay }:
buildPythonPackage rec {
buildPythonPackage {
pname = "usbrelay_py";
inherit (usbrelay) version src;