test naive templates
This commit is contained in:
26
flake.nix
Normal file
26
flake.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
description = "A collection of flake templates";
|
||||||
|
|
||||||
|
outputs = { self }: {
|
||||||
|
|
||||||
|
templates = {
|
||||||
|
|
||||||
|
simplePython = {
|
||||||
|
path = ./python;
|
||||||
|
description = "Python template";
|
||||||
|
};
|
||||||
|
|
||||||
|
rust = {
|
||||||
|
path = ./rust;
|
||||||
|
description = "Simple rust template";
|
||||||
|
};
|
||||||
|
|
||||||
|
vlang = {
|
||||||
|
path = ./vlang;
|
||||||
|
description = "Simple vlang template";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
17
python/flake.nix
Normal file
17
python/flake.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
description = "A small file sorter using tkinter and python";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs }:
|
||||||
|
let
|
||||||
|
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells = forAllSystems (system: {
|
||||||
|
default = pkgs.${system}.callPackage ./shell.nix {} ;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
19
python/shell.nix
Normal file
19
python/shell.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
|
|
||||||
|
let
|
||||||
|
my-python = pkgs.python310;
|
||||||
|
python-with-packages = my-python.withPackages ( p: with p; [
|
||||||
|
pip
|
||||||
|
jedi-language-server
|
||||||
|
]);
|
||||||
|
in
|
||||||
|
pkgs.mkShell {
|
||||||
|
buildInputs = [
|
||||||
|
python-with-packages
|
||||||
|
];
|
||||||
|
shellHook=''
|
||||||
|
export PIP_PREFIX=$(pwd)/_build/pip_packages
|
||||||
|
export PYTHONPATH="$PIP_PREFIX/${pkgs.python3.sitePackages}:$PYTHONPATH"
|
||||||
|
export PATH="$PIP_PREFIX/bin:$PATH"
|
||||||
|
'';
|
||||||
|
}
|
||||||
19
rust/flake.nix
Normal file
19
rust/flake.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs }:
|
||||||
|
let
|
||||||
|
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells = forAllSystems (system :{
|
||||||
|
default = pkgs.${system}.callPackage ./shell.nix {};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
10
rust/shell.nix
Normal file
10
rust/shell.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{pkgs ? import <nixpkgs> {}}:
|
||||||
|
|
||||||
|
pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
cargo
|
||||||
|
rustc
|
||||||
|
pkg-config
|
||||||
|
openssl
|
||||||
|
];
|
||||||
|
}
|
||||||
19
vlang/flake.nix
Normal file
19
vlang/flake.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
description = "A very basic Vlang flake";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, ...}:
|
||||||
|
let
|
||||||
|
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells = forAllSystems (system: {
|
||||||
|
default = pkgs.${system}.callPackage ./shell.nix {};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
21
vlang/shell.nix
Normal file
21
vlang/shell.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
{ pkgs ? import <nixpkgs> {}}:
|
||||||
|
|
||||||
|
pkgs.mkShell rec {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
vlang
|
||||||
|
python3
|
||||||
|
python3Packages.pip
|
||||||
|
gcc
|
||||||
|
hdf5
|
||||||
|
gfortran
|
||||||
|
liblapack
|
||||||
|
openblas
|
||||||
|
openmpi
|
||||||
|
metis
|
||||||
|
#mesa
|
||||||
|
];
|
||||||
|
shellHook = ''
|
||||||
|
unalias v
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user