mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-03-15 11:26:51 +01:00
35 lines
694 B
Nix
35 lines
694 B
Nix
|
{
|
||
|
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
|
||
|
'';
|
||
|
};
|
||
|
});
|
||
|
};
|
||
|
}
|