」 feat: nixos poggies uwu gedagedigedagedayo

This commit is contained in:
y-syo
2024-12-04 19:30:11 +01:00
parent 0273b019c4
commit e19660cfa7
4 changed files with 62 additions and 3 deletions

4
.gitignore vendored
View File

@ -1,11 +1,9 @@
obj/ obj/
minishell
.direnv .direnv
.envrc
flake.nix
compile_commands.json compile_commands.json
.cache .cache
libft/**/*.o libft/**/*.o
libft/**/*.a libft/**/*.a
src/main.c src/main.c
vgcore.* vgcore.*
result

27
flake.lock generated Normal file
View File

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1733261153,
"narHash": "sha256-eq51hyiaIwtWo19fPEeE0Zr2s83DYMKJoukNLgGGpek=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b681065d0919f7eb5309a93cea2cfa84dec9aa88",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

34
flake.nix Normal file
View File

@ -0,0 +1,34 @@
{
description = "minishell flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
};
outputs = { self, nixpkgs, ... }:
let
supportedSystems = [ "x86_64-linux" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
packages = forAllSystems ({ pkgs }: rec {
default = minishell;
minishell = pkgs.stdenv.mkDerivation {
name = "minishell";
src = self;
buildInputs = with pkgs; [
gcc clang readline
];
hardeningDisable = [ "all" ];
buildPhase = ''
make
'';
installPhase = ''
mkdir -p $out/bin
cp -r * $out/bin
'';
};
});
};
}

BIN
minishell Executable file

Binary file not shown.