nixos/pkgs/2i-emulator.nix

28 lines
850 B
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
}: let
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
in
rustPlatform.buildRustPackage {
pname = lock.nodes."2i-emulator".original.repo;
version = lock.nodes."2i-emulator".locked.rev;
src = fetchFromGitHub {
owner = lock.nodes."2i-emulator".locked.owner;
repo = lock.nodes."2i-emulator".locked.repo;
rev = lock.nodes."2i-emulator".locked.rev;
sha256 = lock.nodes."2i-emulator".locked.narHash;
};
cargoSha256 = "sha256-FUtOLYFPRFkUAXixcUzMfDmKju/GN6r/KQYqKCK8vBk=";
meta = with lib; {
description = "Cli emulator for the micro computer 2i used in the computer science hardware course at Leipzig University";
homepage = "https://github.com/klemens/2i-emulator";
license = licenses.gpl3;
maintainers = [];
};
}