Hello, World!

This commit is contained in:
Weckyy702
2026-02-22 00:03:14 +01:00
commit bad59fe733
4 changed files with 92 additions and 0 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
build/
.cache
.direnv
pico_sdk_import.cmake

42
flake.lock generated Normal file
View File

@@ -0,0 +1,42 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1771369470,
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0182a361324364ae3f436a63005877674cf45efb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"systems": "systems"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"id": "systems",
"type": "indirect"
}
}
},
"root": "root",
"version": 7
}

45
flake.nix Normal file
View File

@@ -0,0 +1,45 @@
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs =
inputs @ { nixpkgs
, systems
, ...
}:
let
inherit (nixpkgs) lib;
eachSystem = lib.genAttrs (import systems);
pkgsFor = eachSystem (system:
import nixpkgs {
localSystem = system;
});
in
{
devShells =
eachSystem
(system: {
default =
let
pkgs = pkgsFor.${system};
pico-sdk = pkgs.pico-sdk.override {
withSubmodules = true;
};
PICO_SDK_PATH = "${pico-sdk}/lib/pico-sdk";
in
pkgs.mkShell {
name = "PicoVGA dev shell";
inputsFrom = [ pico-sdk ];
packages = with pkgs;
[
]
++ [ pico-sdk ];
shellHook = ''
ln -sf ${PICO_SDK_PATH}/external/pico_sdk_import.cmake pico_sdk_import.cmake
'';
inherit PICO_SDK_PATH;
};
});
};
}