nixpkgs/pkgs/by-name/sy/system76-firmware/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
1.4 KiB
Nix
Raw Normal View History

2021-03-14 18:12:53 +00:00
{
rustPlatform,
lib,
fetchFromGitHub,
xz,
pkg-config,
openssl,
dbus,
efibootmgr,
makeWrapper,
}:
2020-09-23 00:14:14 +00:00
rustPlatform.buildRustPackage rec {
pname = "system76-firmware";
# Check Makefile when updating, make sure postInstall matches make install
2023-03-04 18:32:19 +00:00
version = "1.0.50";
2020-09-23 00:14:14 +00:00
src = fetchFromGitHub {
owner = "pop-os";
repo = pname;
rev = version;
2023-03-04 18:32:19 +00:00
sha256 = "sha256-nLbDhs+FxIcoVK66bwUAxAubikic5NT8yOA/mH/irgQ=";
2020-09-23 00:14:14 +00:00
};
nativeBuildInputs = [
pkg-config
makeWrapper
];
2020-09-23 00:14:14 +00:00
2021-03-14 18:12:53 +00:00
buildInputs = [
xz
openssl
dbus
];
2020-09-23 00:14:14 +00:00
cargoBuildFlags = [ "--workspace" ];
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"ecflash-0.1.0" = "sha256-W613wbW54R65/rs6oiPAH/qov2OVEjMMszpUJdX4TxI=";
};
};
2020-09-23 00:14:14 +00:00
# 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";
2020-09-23 00:14:14 +00:00
homepage = "https://github.com/pop-os/system76-firmware";
license = licenses.gpl3Only;
maintainers = with maintainers; [ shlevy ];
platforms = [
"i686-linux"
"x86_64-linux"
];
2020-09-23 00:14:14 +00:00
};
}