Codium build almost works
This commit is contained in:
parent
64e8a3c62f
commit
f5c10e7bde
9
flake-compat.nix
Normal file
9
flake-compat.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
let
|
||||||
|
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||||
|
inherit (lock.nodes.flake-compat.locked) owner repo rev narHash;
|
||||||
|
flake-compat = builtins.fetchTarball {
|
||||||
|
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
|
||||||
|
sha256 = narHash;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
import flake-compat { src = ./.; }
|
17
flake.lock
17
flake.lock
|
@ -1,5 +1,21 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1641205782,
|
||||||
|
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1647893727,
|
"lastModified": 1647893727,
|
||||||
|
@ -18,6 +34,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
52
flake.nix
52
flake.nix
|
@ -3,11 +3,16 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
flake-compat = {
|
||||||
|
url = "github:edolstra/flake-compat";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ self
|
{ self
|
||||||
, nixpkgs
|
, nixpkgs
|
||||||
|
, flake-compat
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
# Generate a user-friendly version number.
|
# Generate a user-friendly version number.
|
||||||
|
@ -32,37 +37,36 @@
|
||||||
pkgs = nixpkgsFor."${system}";
|
pkgs = nixpkgsFor."${system}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# In case we don't want to provide an editor, this defaultShell will
|
# In case we don't want to provide an editor, this defaultShell will provide only coq packages we need.
|
||||||
# provide only coq packages we need.
|
|
||||||
defaultShell = pkgs.mkShell {
|
defaultShell = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
yarn
|
yarn
|
||||||
];
|
(pkgs.vscode-with-extensions.override {
|
||||||
};
|
|
||||||
# This is the defaultShell, but overriden to add one additional buildInput,
|
|
||||||
# vscodium!
|
|
||||||
vscodium = self.devShells.${system}.defaultShell.overrideAttrs (old: {
|
|
||||||
buildInputs =
|
|
||||||
let
|
|
||||||
vscodeWithRescript = pkgs.vscode-with-extensions.override {
|
|
||||||
vscode = pkgs.vscodium;
|
vscode = pkgs.vscodium;
|
||||||
vscodeExtensions = pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
vscodeExtensions = pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||||
|
# {
|
||||||
|
# name = "rescript-vscode";
|
||||||
|
# publisher = "rescript-lang";
|
||||||
|
# version = "1.2.1";
|
||||||
|
# # sha256 = "sha256-b0gCaEzt5yAj53oLFZSXSD3bum9J1fYes/uf9+OlUek=";
|
||||||
|
# }
|
||||||
{
|
{
|
||||||
name = "rescript-vscode";
|
name = "vim";
|
||||||
publisher = "rescript-lang";
|
publisher = "vscodevim";
|
||||||
version = "1.2.1";
|
version = "1.22.2";
|
||||||
sha256 = "sha256-b0gCaEzt5yAj53oLFZSXSD3bum9J1fYes/uf9+OlUek=";
|
sha256 = "sha256-dtIlgODzRdoMKnG9050ZcCX3w15A/R3FaMc+ZylvBbU=";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "vscode-typescript-next";
|
||||||
|
publisher = "ms-vscode";
|
||||||
|
version = "4.7.20220323";
|
||||||
|
sha256 = "sha256-mjiBCyg5As/XAU9I5k6jEZWGJA3P6P5o1roe2bS7aUI=";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
})
|
||||||
in
|
];
|
||||||
old.buildInputs
|
};
|
||||||
++ [
|
}
|
||||||
vscodeWithRescript
|
);
|
||||||
];
|
|
||||||
});
|
|
||||||
defaultPackage.${system} = self.packages.${system}.yarn;
|
|
||||||
});
|
|
||||||
defaultPackage.x86_64-linux = self.devShells.defaultPackage.x86_64-linux;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user