initial commit
This commit is contained in:
parent
2da7cf75fb
commit
45cdfd662e
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
description = "Collection of flake templates";
|
||||
|
||||
outputs = { self }: {
|
||||
templates = {
|
||||
python = {
|
||||
path = ./python;
|
||||
description = "Basic python template";
|
||||
};
|
||||
|
||||
rust = {
|
||||
path = ./rust;
|
||||
description = "Basic rust template";
|
||||
};
|
||||
|
||||
go = {
|
||||
path = ./go;
|
||||
description = "Basic go template";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
description = "Basic go flake for development";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { nixpkgs, flake-utils, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
go
|
||||
gopls
|
||||
gotools
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
use flake
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
description = "Basic python flake for development";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { nixpkgs, flake-utils, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
python3
|
||||
];
|
||||
|
||||
packages = with pkgs; [
|
||||
(python3.withPackages (pypkgs: with pypkgs; [
|
||||
]))
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
def cli():
|
||||
pass
|
|
@ -0,0 +1,20 @@
|
|||
[build-system]
|
||||
requires = ["setuptools", "setuptools-scm"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "my_package"
|
||||
dynamic = ["version"]
|
||||
authors = [
|
||||
{name = "Antoine Langlois", email = "dev@antoine-langlois.net"},
|
||||
]
|
||||
description = "My package description"
|
||||
requires-python = ">=3.11"
|
||||
readme = "README.md"
|
||||
license = { file = "LICENSE" }
|
||||
dependencies = []
|
||||
|
||||
[project.optional-dependencies]
|
||||
|
||||
[project.scripts]
|
||||
my_package = "my_package:cli"
|
|
@ -0,0 +1 @@
|
|||
use flake
|
|
@ -0,0 +1,8 @@
|
|||
[package]
|
||||
name = "package_name"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
authors = [ "Antoine Langlois <dev@antoine-langlois.net>" ]
|
||||
description = "A short description"
|
||||
|
||||
[dependencies]
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
rust-bin.stable.latest.default
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
Loading…
Reference in New Issue