nixpkgs/pkgs/by-name/op/opencorsairlink/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

37 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, fetchpatch, libusb1, pkg-config }:
stdenv.mkDerivation rec {
pname = "OpenCorsairLink";
version = "unstable-2019-12-23";
buildInputs = [ libusb1 ];
nativeBuildInputs = [ pkg-config ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
src = fetchFromGitHub {
owner = "audiohacked";
repo = "OpenCorsairLink";
rev = "46dbf206e19a40d6de6bd73142ed93bdb26c5c1a";
sha256 = "1nizicl0mc9pslc6065mnrs0fnn8sh7ca8iiw7w9ix57zrhabpld";
};
patches = [
# Pull upstream fix for -fno-common toolchain
(fetchpatch {
name = "fno-common.patch";
url = "https://github.com/audiohacked/OpenCorsairLink/commit/d600c7ff032a3911d30b039844a31f0b3acfe26a.patch";
sha256 = "030rwka5bvf79x6ir18vqb09izhz1crp94x5gqjxwv3b20vvv4kx";
})
];
meta = with lib; {
description = "Linux and Mac OS support for the CorsairLink Devices";
homepage = "https://github.com/audiohacked/OpenCorsairLink";
license = licenses.gpl2Plus;
platforms = platforms.all;
maintainers = [];
mainProgram = "OpenCorsairLink.elf";
};
}