Initial flake hub – oleks

This commit is contained in:
Oleks
2026-03-12 19:53:43 +02:00
commit 18ff5e1de5
2 changed files with 56 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
{
description = "oleks's personal Flake hub a place to publish custom packages and overlays";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
packages.${system}.hello-world = pkgs.callPackage ./packages/hello-world.nix { };
overlays.default = final: prev: {
hello-world = final.callPackage ./packages/hello-world.nix { };
};
devShells.${system}.default = pkgs.mkShell {
name = "oleks-hub-shell";
buildInputs = [ self.packages.${system}.hello-world ];
nativeBuildInputs = with pkgs; [
nix
fmt
];
shellHook = ''
echo "Welcome to the oleks Flake hub development shell."
'';
};
};
}
+23
View File
@@ -0,0 +1,23 @@
{ stdenv }:
stdenv.mkDerivation {
pname = "hello-world";
version = "1.0.0";
src = builtins.fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/tools/hello/hello.c";
sha256 = "1p9sc9h1b6k7bk25n5g0w9gwy6fxlkchr5hpmxczg4bvp6jv93q6";
};
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/hello-world
chmod +x $out/bin/hello-world
'';
meta = with stdenv.lib; {
description = "A tiny helloworld program used as an example package";
license = licenses.bsd2;
platforms = platforms.unix;
};
}