mirror of
https://github.com/sgillespie/nixos-yubikey-luks.git
synced 2024-09-11 09:55:51 +03:00
seems the file changed here: 88bf1b3e92 (diff-928863deda3fc33e0506277ded7f4985a078c4bd878489b10f9d5f2343bb8da7)
we could also use a branch other than master, to avoid future changes. but seems like they don't happen too often!
20 lines
572 B
Nix
20 lines
572 B
Nix
{ stdenv, fetchurl, openssl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "pbkdf2-sha512";
|
|
version = "latest";
|
|
buildInputs = [openssl];
|
|
|
|
src = fetchurl {
|
|
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/master/nixos/modules/system/boot/pbkdf2-sha512.c";
|
|
sha256 = "0ky414spzpndiifk7wca3q3l9gzs1ksn763dmy48xdn3q0i75s9r";
|
|
};
|
|
|
|
unpackPhase = ":";
|
|
buildPhase = "cc -O3 -I${openssl.dev}/include -L${openssl.out}/lib ${src} -o pbkdf2-sha512 -lcrypto";
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
install -m755 pbkdf2-sha512 $out/bin/pbkdf2-sha512
|
|
'';
|
|
}
|