-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Templates | ||
|
||
These are new flakes that can be generated quickly using: | ||
|
||
```bash | ||
nix flake init -t github:chrishrb/dotfiles#basic | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
description = "Basic project"; | ||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
outputs = { self, nixpkgs, ... }@inputs: inputs.flake-utils.lib.eachDefaultSystem ( | ||
system: | ||
let | ||
pkgs = import nixpkgs { inherit system; }; | ||
in | ||
{ | ||
packages.default = pkgs.mkDerivation { | ||
name = "basic"; | ||
src = self; | ||
# buildInputs = with pkgs; []; | ||
buildPhase = '' | ||
echo "Building..." | ||
mkdir -p $out/bin | ||
echo "#!/bin/bash" > $out/bin/hello.sh | ||
echo "echo Hello, world!" >> $out/bin/hello.sh | ||
''; | ||
}; | ||
|
||
devShells.default = pkgs.mkShell { | ||
# buildInputs = with pkgs; [ ]; | ||
}; | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
description = "Python template"; | ||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
outputs = { nixpkgs, self, ... }@inputs: inputs.flake-utils.lib.eachDefaultSystem ( | ||
system: | ||
let | ||
pkgs = import nixpkgs { inherit system; }; | ||
in | ||
{ | ||
packages.default = pkgs.python312Packages.buildPythonApplication { | ||
name = "python-cli"; | ||
src = self; | ||
buildInputs = with pkgs.python312Packages; [ pip setuptools wheel ]; | ||
checkInputs = with pkgs.python312Packages; [ pytest arnparse requests-mock ]; | ||
propagatedBuildInputs = with pkgs.python3Packages; [ | ||
boto3 | ||
requests | ||
urllib3 | ||
click | ||
]; | ||
}; | ||
} | ||
); | ||
} |