3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
Daniël de Kok 85f96822a0 treewide: fix cargoSha256/cargoHash
Rust 1.50.0 incorporated a Cargo change (rust-lang/cargo#8937) in
which cargo vendor erroneously changed permissions of vendored
crates. This was fixed in Rust
1.51.0 (rust-lang/cargo#9131). Unfortunately, this means that all
cargoSha256/cargoHashes produced during the Rust 1.50.0 cycle are
potentially broken.

This change updates cargoSha256/cargoHash tree-wide.

Fixes #121994.
2021-05-08 00:36:37 -07:00

40 lines
1.2 KiB
Nix

{ rustPlatform, lib, fetchFromGitHub, xz, pkg-config, openssl, dbus, efibootmgr, makeWrapper }:
rustPlatform.buildRustPackage rec {
pname = "system76-firmware";
# Check Makefile when updating, make sure postInstall matches make install
version = "1.0.24";
src = fetchFromGitHub {
owner = "pop-os";
repo = pname;
rev = version;
sha256 = "sha256-Poe18HKEQusvN3WF4ZAV1WCvU8/3HKpHEqDsfDO62V0=";
};
nativeBuildInputs = [ pkg-config makeWrapper ];
buildInputs = [ xz openssl dbus ];
cargoBuildFlags = [ "--workspace" ];
cargoSha256 = "sha256-gGw3zpxLxQZ3rglpDERO0fSxBOez1Q10Fljis6nyB/4=";
# Purposefully don't install systemd unit file, that's for NixOS
postInstall = ''
install -D -m -0644 data/system76-firmware-daemon.conf $out/etc/dbus-1/system.d/system76-firmware-daemon.conf
for bin in $out/bin/system76-firmware-*
do
wrapProgram $bin --prefix PATH : "${efibootmgr}/bin"
done
'';
meta = with lib; {
description = "Tools for managing firmware updates for system76 devices";
homepage = "https://github.com/pop-os/system76-firmware";
license = licenses.gpl3Only;
maintainers = with maintainers; [ shlevy ];
platforms = [ "i686-linux" "x86_64-linux" ];
};
}