From b5750fb4fcccd8907032d8bbc9d5ebaaa8782741 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 4 Feb 2025 16:53:58 -0600 Subject: [PATCH] roc is doing interesting things again --- flake.lock | 83 ++++++++++++++++++++++++++++++-- flake.nix | 23 ++++----- hosts/othalan/settings/languages | 1 + modules/languages/roc.nix | 15 +++--- pkgs/default.nix | 3 ++ 5 files changed, 97 insertions(+), 28 deletions(-) diff --git a/flake.lock b/flake.lock index fd7c862..ae4a0d4 100644 --- a/flake.lock +++ b/flake.lock @@ -74,6 +74,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": [ @@ -424,7 +440,9 @@ "nixpkgs": [ "nixpkgs" ], - "rust-overlay": "rust-overlay" + "rust-overlay": [ + "rust-overlay" + ] }, "locked": { "lastModified": 1735790175, @@ -559,6 +577,31 @@ "type": "github" } }, + "nixgl": { + "inputs": { + "flake-utils": [ + "roc", + "flake-utils" + ], + "nixpkgs": [ + "roc", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1713543440, + "narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=", + "owner": "guibou", + "repo": "nixGL", + "rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a", + "type": "github" + }, + "original": { + "owner": "guibou", + "repo": "nixGL", + "type": "github" + } + }, "nixos-wsl": { "inputs": { "flake-compat": [], @@ -655,6 +698,35 @@ "type": "github" } }, + "roc": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": [ + "flake-utils" + ], + "nixgl": "nixgl", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": [ + "rust-overlay" + ] + }, + "locked": { + "lastModified": 1738131757, + "narHash": "sha256-cXWFnT2SlNvc8gRAhlUNakVGWii3VWZsvNijMRpX7XA=", + "owner": "roc-lang", + "repo": "roc", + "rev": "689c58f35e0a39ca59feba549f7fcf375562a7a6", + "type": "github" + }, + "original": { + "owner": "roc-lang", + "ref": "0.0.0-alpha2-rolling", + "repo": "roc", + "type": "github" + } + }, "root": { "inputs": { "NixVirt": "NixVirt", @@ -677,6 +749,8 @@ "nixpkgs-lib": "nixpkgs-lib", "nixpkgs-wayland": "nixpkgs-wayland", "pixi": "pixi", + "roc": "roc", + "rust-overlay": "rust-overlay", "sops-nix": "sops-nix", "stable": "stable", "systems": "systems", @@ -688,16 +762,15 @@ "rust-overlay": { "inputs": { "nixpkgs": [ - "jj", "nixpkgs" ] }, "locked": { - "lastModified": 1732242723, - "narHash": "sha256-NWI8csIK0ujFlFuEXKnoc+7hWoCiEtINK9r48LUUMeU=", + "lastModified": 1738635966, + "narHash": "sha256-5MbJhh6nz7tx8FYVOJ0+ixMaEn0ibGzV/hScPMmqVTE=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "a229311fcb45b88a95fdfa5cecd8349c809a272a", + "rev": "1ff8663cd75a11e61f8046c62f4dbb05d1907b44", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index ddc0d1b..c042fa2 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,8 @@ utils.url = "git+https://git.dayl.in/daylin/utils.git"; pixi.url = "github:daylinmorgan/pixi-flake"; jj.url = "github:martinvonz/jj/v0.25.0"; + # roc.url ="github:roc-lang/roc/0.0.0-alpha2-rolling"; + roc.url ="github:roc-lang/roc/0.0.0-alpha2-rolling"; # master as of 2024.12.12 NixVirt.url = "github:AshleyYakeley/NixVirt?rev=9063243af5e6674359a0ff7cec57f02eeacf0cea"; @@ -51,6 +53,7 @@ nixpkgs-wayland.inputs.nixpkgs.follows = "nixpkgs"; NixVirt.inputs.nixpkgs.follows = "nixpkgs"; pixi.inputs.nixpkgs.follows = "nixpkgs"; + roc.inputs.nixpkgs.follows = "nixpkgs"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; tsm.inputs.nixpkgs.follows = "nixpkgs"; @@ -61,20 +64,6 @@ tsm.inputs.nim2nix.follows = "nim2nix"; utils.inputs.nim2nix.follows = "nim2nix"; - # lix-attic = { - # url = "git+https://git.lix.systems/nrabulinski/attic.git"; - # inputs.nixpkgs.follows = "nixpkgs"; - # inputs.lix-module.follows = "lix-module"; - # # make lix-module source of truth - # inputs.lix.follows = "lix-module/lix"; - # inputs.nix-github-actions.follows = ""; - # }; - - # roc = { - # url = "github:roc-lang/roc"; - # inputs.nixpkgs.follows = "nixpkgs"; - # }; - # zig-overlay.url = "github:mitchellh/zig-overlay"; # zig-overlay.inputs.nixpkgs.follows = "nixpkgs"; # zls.url = "github:zigtools/zls"; @@ -101,6 +90,7 @@ flake-utils.url = "github:numtide/flake-utils"; jj.inputs.flake-utils.follows = "flake-utils"; lib-aggregate.inputs.flake-utils.follows = "flake-utils"; + roc.inputs.flake-utils.follows = "flake-utils"; lib-aggregate.url = "github:nix-community/lib-aggregate"; nixpkgs-wayland.inputs.lib-aggregate.follows = "lib-aggregate"; @@ -113,6 +103,11 @@ nixos-wsl.inputs.flake-compat.follows = ""; nixpkgs-wayland.inputs.flake-compat.follows = ""; + rust-overlay.url = "github:oxalica/rust-overlay"; + rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; + jj.inputs.rust-overlay.follows ="rust-overlay"; + roc.inputs.rust-overlay.follows = "rust-overlay"; + }; nixConfig = { diff --git a/hosts/othalan/settings/languages b/hosts/othalan/settings/languages index b490acb..8ebf6ce 100644 --- a/hosts/othalan/settings/languages +++ b/hosts/othalan/settings/languages @@ -5,3 +5,4 @@ nushell python tex typst +roc diff --git a/modules/languages/roc.nix b/modules/languages/roc.nix index 77a1964..5cfe3cc 100644 --- a/modules/languages/roc.nix +++ b/modules/languages/roc.nix @@ -1,27 +1,24 @@ { config, lib, - inputs, + # inputs, flake, ... }: let inherit (lib) mkIfIn flakeVer; - version = flakeVer inputs.roc; + # version = flakeVer inputs.roc; cfg = config.oizys.languages; rocPkgs = flake.pkgs "roc"; # I'm setting the versions so the changes are more apparent as flake is updated - roc = rocPkgs.cli.overrideAttrs { - inherit version; - - }; - lang-server = rocPkgs.lang-server.overrideAttrs { inherit version; }; + # roc = rocPkgs.cli.overrideAttrs { inherit version; }; + # lang-server = rocPkgs.lang-server.overrideAttrs { inherit version; }; in { config = mkIfIn "roc" cfg { - environment.systemPackages = [ - roc + environment.systemPackages = with rocPkgs; [ + cli lang-server ]; }; diff --git a/pkgs/default.nix b/pkgs/default.nix index c804ad5..88a1d65 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -18,6 +18,9 @@ in llm-with-plugins = pkgs.callPackage ./llm/llm-with-plugins { }; lix = (flake.pkg "lix-module"); + + roc = (flake.pkgs "roc").cli; + roc-lang-server = (flake.pkgs "roc").lang-server; } // (flake.toPackageAttrs [ "pixi"