Skip to content

chore: upgrade from nix-shell to nix flake #1114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions default.nix

This file was deleted.

77 changes: 77 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
description = "A Nix flake for the meshStack docs developer shell";

inputs = {
nixpkgs.url = "nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";

# Fixing packages
# 1. Find out which package is needed under https://search.nixos.org/packages
# 2. Search package under https://lazamar.co.uk/nix-versions/ and pick version
# 3. Extract the packages as per instructions
# 4. Add packages in pkgs.mkShell
dhall-pkgs = {
url = "github:NixOS/nixpkgs/d86bcbb415938888e7f606d55c52689aec127f43";
};
};

outputs = { self, nixpkgs, flake-utils, dhall-pkgs }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
dhallpkgs = import dhall-pkgs { inherit system; };

fix_dhall = dhallpkgs.haskellPackages.dhall_1_41_1; # https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=dhall
fix_dhall_docs = dhallpkgs.haskellPackages.dhall-docs; # https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=dhall-docs
fix_dhall_json = dhallpkgs.haskellPackages.dhall-json_1_7_10; # https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=dhall-json
fix_dhall_lsp = dhallpkgs.dhall-lsp-server;

core_packages = [
# node / typescript (meshPanel, utilities eetc.)
pkgs.nodejs_22
(pkgs.yarn.override {
nodejs = pkgs.nodejs_22;
})
];
in
{
devShells.default = pkgs.mkShell {
name = "shell with all basic runtimes and tools";
packages = core_packages;
};
}
);
}