Skip to content

Commit

Permalink
build: add .envrc to castles and shell lock
Browse files Browse the repository at this point in the history
  • Loading branch information
loicreynier committed Mar 9, 2024
1 parent bd0a09b commit cd3fa02
Show file tree
Hide file tree
Showing 31 changed files with 179 additions and 28 deletions.
5 changes: 5 additions & 0 deletions advection-stab/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if has nix; then
use nix
fi

# vim: ft=sh
10 changes: 9 additions & 1 deletion advection-stab/shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{pkgs ? import <nixpkgs> {}}: let
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ../flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
}: let
pythonWithPackages = pkgs.python3.withPackages (p:
with p; [
matplotlib
Expand Down
2 changes: 1 addition & 1 deletion coconut-factorial/.envrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if command -v nix &> /dev/null; then
if has nix; then
use nix
fi

Expand Down
11 changes: 10 additions & 1 deletion coconut-factorial/shell.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{pkgs ? import <nixpkgs> {}}:
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ../flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
}:
pkgs.mkShell {
packages = with pkgs; [
just
coconut
];
}
2 changes: 1 addition & 1 deletion f03cli/.envrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if command -v nix &> /dev/null; then
if has nix; then
use nix
fi

Expand Down
10 changes: 9 additions & 1 deletion f03cli/shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{pkgs ? import <nixpkgs> {}}:
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ../flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
}:
pkgs.mkShell {
packages = with pkgs; [
fprettify
Expand Down
5 changes: 5 additions & 0 deletions gmres-scipy/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if has nix; then
use nix
fi

# vim: ft=sh
1 change: 1 addition & 0 deletions gmres-scipy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__/
10 changes: 9 additions & 1 deletion gmres-scipy/shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{pkgs ? import <nixpkgs> {}}: let
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ../flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
}: let
pythonWithPackages = pkgs.python3.withPackages (p:
with p; [
numpy
Expand Down
5 changes: 5 additions & 0 deletions isosurf-skimage/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if has nix; then
use nix
fi

# vim: ft=sh
9 changes: 8 additions & 1 deletion isosurf-skimage/shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{pkgs ? import <nixpkgs> {}}: let
let
nixpkgs-version = "ed20d94473a7811ee9f8c045c6be326176fd648d";
pkgs = import (builtins.fetchTarball {
name = "nixpkgs-${nixpkgs-version}";
url = "https://github.com/nixos/nixpkgs/archive/${nixpkgs-version}.tar.gz";
sha256 = "sha256-qR+/HFGZxlAmSKUIlQOM+WRIcEG6oRrdVm4KUvS7694=";
}) {};

dontCheckPython = drv: drv.overridePythonAttrs (old: {doCheck = false;});
pythonWithPackages = pkgs.python3.withPackages (p:
with p; [
Expand Down
2 changes: 1 addition & 1 deletion jmtpfs-pyudev/.envrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if command -v nix &> /dev/null; then
if has nix; then
use nix
fi

Expand Down
10 changes: 9 additions & 1 deletion jmtpfs-pyudev/shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{pkgs ? import <nixpkgs> {}}: let
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ../flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
}: let
pythonWithPackages = pkgs.python3.withPackages (p:
with p; [
pyudev
Expand Down
5 changes: 5 additions & 0 deletions numbat-demo/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if has nix; then
use nix
fi

# vim: ft=sh
10 changes: 9 additions & 1 deletion numbat-demo/shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{pkgs ? import <nixpkgs> {}}:
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ../flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
}:
pkgs.mkShell {
packages = with pkgs; [
numbat
Expand Down
5 changes: 5 additions & 0 deletions porn.py/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if has nix; then
use nix
fi

# vim: ft=sh
10 changes: 9 additions & 1 deletion porn.py/shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{pkgs ? import <nixpkgs> {}}:
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ../flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
}:
pkgs.mkShell {
packages = with pkgs; [
python311
Expand Down
2 changes: 1 addition & 1 deletion presenterm-demo/.envrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if command -v nix &> /dev/null; then
if has nix; then
use nix
fi

Expand Down
10 changes: 9 additions & 1 deletion presenterm-demo/shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{pkgs ? import <nixpkgs> {}}:
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ../flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
}:
pkgs.mkShell {
packages = with pkgs; [
presenterm
Expand Down
6 changes: 0 additions & 6 deletions pwsh-magic/shell.nix

This file was deleted.

5 changes: 5 additions & 0 deletions pyfftw-demo/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if has nix; then
use nix
fi

# vim: ft=sh
11 changes: 9 additions & 2 deletions pyfftw-demo/shell.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{pkgs ? import <nixpkgs> {}}: let
dontCheckPython = drv: drv.overridePythonAttrs (old: {doCheck = false;});
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ../flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
}: let
pythonWithPackages = pkgs.python3.withPackages (p:
with p; [
numpy
Expand Down
5 changes: 5 additions & 0 deletions python-perf/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if has nix; then
use nix
fi

# vim: ft=sh
10 changes: 9 additions & 1 deletion python-perf/shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{pkgs ? import <nixpkgs> {}}: let
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ../flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
}: let
pythonWithPackages = pkgs.python3.withPackages (p:
with p; [
numpy
Expand Down
2 changes: 1 addition & 1 deletion regula-falsi.c/.envrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if command -v nix &> /dev/null; then
if has nix; then
use nix
fi

Expand Down
10 changes: 9 additions & 1 deletion regula-falsi.c/shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{pkgs ? import <nixpkgs> {}}:
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ../flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
}:
pkgs.mkShell {
packages = with pkgs; [
gnumake
Expand Down
4 changes: 2 additions & 2 deletions rnm-go/.envrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if command -v nix &> /dev/null; then
use flake
if has nix; then
use flake .
fi

# vim: ft=sh
5 changes: 5 additions & 0 deletions spotify-opus2mp3/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if has nix; then
use nix
fi

# vim: ft=sh
10 changes: 9 additions & 1 deletion spotify-opus2mp3/shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{pkgs ? import <nixpkgs> {}}: let
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ../flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
}: let
pythonWithPackages = pkgs.python3.withPackages (p:
with p; [
mutagen
Expand Down
5 changes: 5 additions & 0 deletions typst-demo/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if has nix; then
use nix
fi

# vim: ft=sh
10 changes: 9 additions & 1 deletion typst-demo/shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{pkgs ? import <nixpkgs> {}}:
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ../flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
}:
pkgs.mkShell {
packages = with pkgs; [
typst
Expand Down

0 comments on commit cd3fa02

Please sign in to comment.