-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
116 lines (103 loc) · 3.46 KB
/
flake.nix
File metadata and controls
116 lines (103 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
description = "modshells - {project-description}";
# *REMINDER: Update inputs with actual dependencies*
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
# Add language-specific inputs:
# rust-overlay.url = "github:oxalica/rust-overlay"; # For Rust
# fenix.url = "github:nix-community/fenix"; # Alternative Rust
};
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
# overlays = [ (import inputs.rust-overlay) ]; # For Rust
};
# *REMINDER: Define build dependencies*
buildInputs = with pkgs; [
# Language-specific dependencies:
# gnat13 # Ada
# cargo rustc # Rust
# elixir # Elixir
# For build tools:
just
podman
git
];
# *REMINDER: Define development dependencies*
nativeBuildInputs = with pkgs; [
# Development tools:
ripgrep # Code search
lychee # Link validation
# Language-specific:
# rustfmt clippy # Rust
# mix # Elixir
];
in
{
# Development shell
devShells.default = pkgs.mkShell {
inherit buildInputs nativeBuildInputs;
shellHook = ''
echo "🚀 modshells development environment"
echo "Language: mixed"
echo ""
echo "Available commands:"
echo " just --list # Show all tasks"
echo " just setup # Set up environment"
echo " just build # Build project"
echo " just test # Run tests"
echo " just validate # RSR compliance"
echo ""
# *REMINDER: Add language-specific environment setup*
# export CARGO_HOME=$PWD/.cargo # Rust
# export MIX_HOME=$PWD/.mix # Elixir
'';
};
# Packages
packages.default = pkgs.stdenv.mkDerivation {
pname = "modshells";
version = "0.1.0";
src = ./.;
inherit buildInputs nativeBuildInputs;
buildPhase = ''
# *REMINDER: Add build commands*
# For Rust: cargo build --release
# For Elixir: mix compile
# For Ada: gprbuild -P modshells.gpr -XMODE=release
'';
installPhase = ''
mkdir -p $out/bin
# *REMINDER: Add install commands*
# cp target/release/modshells $out/bin/ # Rust
# cp bin/modshells $out/bin/ # Ada
'';
meta = with pkgs.lib; {
description = "{project-description}";
homepage = "{repo-url}";
license = with licenses; [ mit ]; # MIT + Palimpsest
maintainers = [ "{maintainer-name}" ];
platforms = platforms.unix;
};
};
# Apps
apps.default = {
type = "app";
program = "${self.packages.${system}.default}/bin/modshells";
};
# Checks (CI/CD integration)
checks = {
build = self.packages.${system}.default;
# *REMINDER: Add test checks*
test = pkgs.runCommand "test-modshells" {
buildInputs = [ self.packages.${system}.default ];
} ''
# Run tests here
touch $out
'';
};
}
);
}