Created
June 22, 2023 15:02
-
-
Save idrisr/da984cb2cf80e0aaaa5cadb0587ba22b 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 = "2020 qemu advent calendar"; | |
outputs = { self, nixpkgs, ... }: | |
let | |
system = "x86_64-linux"; | |
pkgs = import nixpkgs { inherit system; }; | |
prog = with pkgs; | |
stdenv.mkDerivation { | |
name = "qemu-advent-day01"; | |
src = fetchurl { | |
url = | |
"https://www.qemu-advent-calendar.org/2020/download/day01.tar.gz"; | |
hash = "sha256-joBFhVbCqibSx2r1eb9Tyme5Rgz+MiY9vARK5HnI8VU="; | |
}; | |
buildPhase = ""; | |
buildInputs = [ qemu ]; | |
installPhase = '' | |
mkdir -p $out | |
cp run.sh $out | |
cp tweetboot.img $out | |
cp adv-cal.txt $out | |
''; | |
}; | |
in { | |
apps.${system}.day01 = { | |
program = "${prog}/run.sh"; | |
type = "app"; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment