Skip to content

Commit

Permalink
Add shell.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-abrar committed Jun 2, 2024
1 parent 5c396e2 commit fcc76cb
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nixpkgs/23.11/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# DO NOT HAND-EDIT THIS FILE
import (import ./thunk.nix)
8 changes: 8 additions & 0 deletions nixpkgs/23.11/github.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"owner": "nixos",
"repo": "nixpkgs",
"branch": "nixos-23.11",
"private": false,
"rev": "9d29cd266cebf80234c98dd0b87256b6be0af44e",
"sha256": "0bkrjx4x6sy4g9kmcddhlwrl4cpm4yvj7cljd7b8crf7kxpvaaf6"
}
12 changes: 12 additions & 0 deletions nixpkgs/23.11/thunk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# DO NOT HAND-EDIT THIS FILE
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else (import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
}) {}).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in fetch json
2 changes: 2 additions & 0 deletions nixpkgs/unstable/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# DO NOT HAND-EDIT THIS FILE
import (import ./thunk.nix)
8 changes: 8 additions & 0 deletions nixpkgs/unstable/github.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"owner": "nixos",
"repo": "nixpkgs",
"branch": "nixpkgs-unstable",
"private": false,
"rev": "e2dd4e18cc1c7314e24154331bae07df76eb582f",
"sha256": "19zbxf7rb787jvyrfhl4z9sn3aisd6xvx6ikybbi75ym9sy39jds"
}
12 changes: 12 additions & 0 deletions nixpkgs/unstable/thunk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# DO NOT HAND-EDIT THIS FILE
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else (import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
}) {}).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in fetch json
11 changes: 11 additions & 0 deletions release.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
let pkgs = import ./nixpkgs/23.11 {};
ghcs = {
"ghc8107" = pkgs.haskell.packages.ghc8107;
"ghc902" = pkgs.haskell.packages.ghc902;
"ghc928" = pkgs.haskell.packages.ghc928;
"ghc948" = pkgs.haskell.packages.ghc948;
"ghc963" = pkgs.haskell.packages.ghc963;
"ghc981" = (import ./nixpkgs/unstable {}).haskell.packages.ghc981;
};
in
pkgs.lib.mapAttrs (_: ghc: ghc.callCabal2nix "monoidal-containers" (builtins.fetchGit ./.) {}) ghcs
3 changes: 3 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{ ghc ? "ghc981" # see release.nix for options
}:
(import ./release.nix).${ghc}.env

0 comments on commit fcc76cb

Please sign in to comment.