diff --git a/file.typ b/file.typ index b0e16df..b00847a 100644 --- a/file.typ +++ b/file.typ @@ -1 +1,2 @@ +== Haha yolo swagg diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..7d59579 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1686858960, + "narHash": "sha256-YO8CVbKQPOUZcpbNHVF2WWKrs+AByCbdggUYc6qAvzs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "95c729c030b3011c5c89107ac9fa30f7249135fe", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index e69de29..240e0c9 100644 --- a/flake.nix +++ b/flake.nix @@ -0,0 +1,44 @@ +{ + description = "Fake Flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + in { + packages = rec { + default = cfile; + cfile = pkgs.stdenv.mkDerivation { + name = "hello"; + src = self; + buildInputs = [ + pkgs.gcc + ]; + buildPhase = "gcc -o hello ./hello.c"; + installPhase = "mkdir -p $out/bin; install -t $out/bin hello"; + }; + + pdf = let outputFilename = "yolo.pdf"; + in pkgs.stdenv.mkDerivation { + name = "some-pdf"; + src = self; + buildInputs = [ + pkgs.typst + cfile + ]; + buildPhase = '' + ${cfile}/bin/hello > dummyfile.typ + typst compile dummyfile.typ ${outputFilename} + ''; + installPhase = "mkdir $out; install -t $out ${outputFilename}"; + }; + }; + }); +} + + + diff --git a/hello.c b/hello.c new file mode 100644 index 0000000..ef3a18c --- /dev/null +++ b/hello.c @@ -0,0 +1,6 @@ +#include + +int main(int argc, char** argv) { + printf("== Chutney\n"); + printf("chutney \n"); +}