non important commit
This commit is contained in:
parent
60bba51792
commit
6a45494416
2 changed files with 13 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
description = "My cpp development shell";
|
description = "My cpp development shell";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
};
|
};
|
||||||
|
|
@ -9,6 +10,7 @@
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
};
|
};
|
||||||
|
name = "change_this";
|
||||||
in {
|
in {
|
||||||
devShells."${system}" = {
|
devShells."${system}" = {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
|
|
@ -18,5 +20,13 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defaultPackage."${system}" = with import pkgs;
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "${name}";
|
||||||
|
src = self;
|
||||||
|
buildPhase = "g++ -o ${name} ./main.cpp";
|
||||||
|
installPhase = "mkdir -p $out/bin; install -t $out/bin ${name}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
sed -i -e "s/change_this/$1/g" flake.nix
|
||||||
Loading…
Add table
Add a link
Reference in a new issue