Created
June 24, 2023 21:22
-
-
Save idrisr/3afaa4aed05bbb9ba8d0490d19e30f0f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs.nixpkgs.url = "nixpkgs"; | |
description = "qemu rust game of life"; | |
outputs = { self, nixpkgs, ... }: | |
let | |
system = "x86_64-linux"; | |
pkgs = import nixpkgs { inherit system; }; | |
thing = with pkgs; | |
stdenv.mkDerivation { | |
name = "gameoflife"; | |
src = fetchFromGitHub { | |
owner = "glitzflitz"; | |
repo = "gameoflife"; | |
rev = "ac17b5987f845f242bc7c9f8f4aea38e8a98f92f"; | |
hash = "sha256-LVYlVwwAWPuKpNcYDmyStlctS/OUa6wIhPXrPzBlp6A="; | |
}; | |
cargoHash = "sha256-yBoaLqynvYC9ebC0zjd2FmSSd53xzn4ralihtCFubAw="; | |
installPhase = '' | |
mkdir -p $out | |
mv ./gameoflife.bin $out | |
mv ./run.sh $out | |
mv ./README.md $out | |
''; | |
}; | |
in { | |
apps.${system}.default = { | |
program = "${thing}/bin/thing"; | |
type = "app"; | |
}; | |
packages.${system}.default = thing; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment