summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock123
-rw-r--r--flake.nix15
-rw-r--r--home/packages.nix36
-rw-r--r--pkgs/overlay.nix62
-rw-r--r--pkgs/typst.nix23
5 files changed, 101 insertions, 158 deletions
diff --git a/flake.lock b/flake.lock
index 3d5e7fb..220d149 100644
--- a/flake.lock
+++ b/flake.lock
@@ -3,11 +3,11 @@
"almanac": {
"flake": false,
"locked": {
- "lastModified": 1642977693,
- "narHash": "sha256-fu4hJstxWMPorrJZ2tM4PrHppwfpzDF+4eyTyGPbF+8=",
+ "lastModified": 1679514360,
+ "narHash": "sha256-sCAaGFNGzb51+v/JLBW5Rp5RaHr+3drlaw56y36YBCA=",
"ref": "refs/heads/master",
- "rev": "7f06bb4c52bdc9f5dec1b7070f14d2001636ca8f",
- "revCount": 60,
+ "rev": "cdd82b013777324f146c4961b866154a9287110b",
+ "revCount": 61,
"type": "git",
"url": "https://stuebinm.eu/git/forks/almanac"
},
@@ -48,32 +48,9 @@
"url": "ssh://cgit/~/blog"
}
},
- "crane": {
- "inputs": {
- "flake-compat": "flake-compat",
- "flake-utils": "flake-utils",
- "nixpkgs": [
- "nixpkgs"
- ],
- "rust-overlay": "rust-overlay"
- },
- "locked": {
- "lastModified": 1679461034,
- "narHash": "sha256-pX4jF5hfEfBGlKw2yDJj9FjvVxmMdGgqKe1I+Vbail8=",
- "owner": "ipetkov",
- "repo": "crane",
- "rev": "ec69da697357cfe7d9e8653b0cfbe73eaecca34b",
- "type": "github"
- },
- "original": {
- "owner": "ipetkov",
- "repo": "crane",
- "type": "github"
- }
- },
"deploy-rs": {
"inputs": {
- "flake-compat": "flake-compat_2",
+ "flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
@@ -95,7 +72,7 @@
},
"emacs-overlay": {
"inputs": {
- "flake-utils": "flake-utils_2",
+ "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
@@ -129,22 +106,6 @@
"flake-compat": {
"flake": false,
"locked": {
- "lastModified": 1673956053,
- "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
- "owner": "edolstra",
- "repo": "flake-compat",
- "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
- "type": "github"
- },
- "original": {
- "owner": "edolstra",
- "repo": "flake-compat",
- "type": "github"
- }
- },
- "flake-compat_2": {
- "flake": false,
- "locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
@@ -158,7 +119,7 @@
"type": "github"
}
},
- "flake-compat_3": {
+ "flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1668681692,
@@ -176,21 +137,6 @@
},
"flake-utils": {
"locked": {
- "lastModified": 1676283394,
- "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
- "owner": "numtide",
- "repo": "flake-utils",
- "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
- "type": "github"
- },
- "original": {
- "owner": "numtide",
- "repo": "flake-utils",
- "type": "github"
- }
- },
- "flake-utils_2": {
- "locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
@@ -204,7 +150,7 @@
"type": "github"
}
},
- "flake-utils_3": {
+ "flake-utils_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
@@ -274,26 +220,6 @@
"url": "https://stuebinm.eu/git/isabelle-utils"
}
},
- "naersk": {
- "inputs": {
- "nixpkgs": [
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1671096816,
- "narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=",
- "owner": "nix-community",
- "repo": "naersk",
- "rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114",
- "type": "github"
- },
- "original": {
- "owner": "nix-community",
- "repo": "naersk",
- "type": "github"
- }
- },
"nixpkgs": {
"locked": {
"lastModified": 1673540789,
@@ -392,18 +318,16 @@
"inputs": {
"almanac": "almanac",
"blog": "blog",
- "crane": "crane",
"deploy-rs": "deploy-rs",
"emacs-overlay": "emacs-overlay",
"feeds": "feeds",
"gtfsBooks": "gtfsBooks",
"home-manager": "home-manager",
"isabelle-utils": "isabelle-utils",
- "naersk": "naersk",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable",
"playground": "playground",
- "rust-overlay": "rust-overlay_2",
+ "rust-overlay": "rust-overlay",
"showrt": "showrt",
"simple-nixos-mailserver": "simple-nixos-mailserver",
"tracktrain": "tracktrain",
@@ -414,32 +338,7 @@
},
"rust-overlay": {
"inputs": {
- "flake-utils": [
- "crane",
- "flake-utils"
- ],
- "nixpkgs": [
- "crane",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1677812689,
- "narHash": "sha256-EakqhgRnjVeYJv5+BJx/NZ7/eFTMBxc4AhICUNquhUg=",
- "owner": "oxalica",
- "repo": "rust-overlay",
- "rev": "e53e8853aa7b0688bc270e9e6a681d22e01cf299",
- "type": "github"
- },
- "original": {
- "owner": "oxalica",
- "repo": "rust-overlay",
- "type": "github"
- }
- },
- "rust-overlay_2": {
- "inputs": {
- "flake-utils": "flake-utils_3",
+ "flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
@@ -478,7 +377,7 @@
"simple-nixos-mailserver": {
"inputs": {
"blobs": "blobs",
- "flake-compat": "flake-compat_3",
+ "flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs_3",
"nixpkgs-22_11": "nixpkgs-22_11",
"utils": "utils_3"
diff --git a/flake.nix b/flake.nix
index 8aaa8ef..dd490c5 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,15 +8,10 @@
home-manager.url = "github:nix-community/home-manager/release-22.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
- naersk.url = "github:nix-community/naersk";
- naersk.inputs.nixpkgs.follows = "nixpkgs";
deploy-rs.url = "github:serokell/deploy-rs";
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master";
emacs-overlay.url = "gitlab:nix-community/emacs-overlay?rev=d938b780a3d8072aeac0178c46121060079ff217";
-
- crane.url = "github:ipetkov/crane";
- crane.inputs.nixpkgs.follows = "nixpkgs";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
@@ -51,7 +46,6 @@
system = "x86_64-linux";
overlays = [
inputs.rust-overlay.overlays.default
- inputs.crane.overlays.default
self.overlays.default
];
};
@@ -61,7 +55,10 @@
modules = [ config ] ++ imports;
pkgs = nixpkgs;
- specialArgs = { inherit inputs system; };
+ specialArgs = {
+ inherit inputs system;
+ craneLib = inputs.crane.lib.${system};
+ };
};
mkServer = mkConfig [ ./common/headless.nix ];
mkDesktop = mkConfig [ ./common/desktop.nix ];
@@ -119,7 +116,9 @@
overlays.default = final: prev:
import ./pkgs/overlay.nix { inherit inputs; } final prev;
packages.x86_64-linux = {
- inherit (nixpkgs) galmon-core galmon-full glitchtip typst;
+ inherit (nixpkgs) galmon-core galmon-full glitchtip typst
+ almanac kijetesantakaluotokieni showrt isabelle-utils isabat
+ emacs29;
};
};
}
diff --git a/home/packages.nix b/home/packages.nix
index 840e138..78c6b4c 100644
--- a/home/packages.nix
+++ b/home/packages.nix
@@ -1,35 +1,7 @@
-{ config, lib, pkgs, inputs, system, ... }:
+{ config, lib, pkgs, inputs, system, craneLib, ... }:
let
- naersk = pkgs.callPackage inputs.naersk {};
- extras = {
- almanac = naersk.buildPackage inputs.almanac;
- kijetesantakaluotokieni = naersk.buildPackage (pkgs.fetchgit {
- url = "https://git.2ki.xyz/spiders/kijetesantakaluotokieni";
- rev = "7d9ea828f42ffd9fb6826ea4cbf7677b08222064";
- sha256 = "sha256-PEp+K5mRNUR6yWLrpGpiX8qvaPQIibA17NQwXUiC2lk=";
- });
- showrt = naersk.buildPackage {
- src = inputs.showrt;
- buildInputs = [ pkgs.protobuf ];
- };
- };
isabelle = import "${inputs.playground.outPath}/isabelle-nix-fhsenv" { inherit pkgs; };
- emacs29 = pkgs.callPackage
- (import "${inputs.nixpkgs.outPath}/pkgs/applications/editors/emacs/generic.nix" {
- version = "29";
- sha256 = "sha256-AI4eNgzRLnM1s4hQa0YWJxZR3WZoIuKy7BYosT06K1c=";
- }) {
- inherit (pkgs.darwin.apple_sdk.frameworks) AppKit Carbon Cocoa IOKit OSAKit Quartz
- QuartzCore WebKit ImageCaptureCore GSS ImageIO;
- gconf = null;
- alsa-lib = null;
- gpm = null;
- libXaw = pkgs.xorg.libXaw;
- inherit (pkgs.darwin) sigtool;
- withPgtk = true;
- withX = false;
- };
in
{
home.packages = with pkgs; [
@@ -48,8 +20,8 @@ in
texlive.combined.scheme-full xournal pandoc zathura pdfpc
poppler_utils typst
# general cli utils
- extras.almanac libnotify grim slurp wl-clipboard extras.showrt
- extras.kijetesantakaluotokieni mpc_cli duf dufs progress hledger
+ almanac libnotify grim slurp wl-clipboard showrt
+ kijetesantakaluotokieni mpc_cli duf dufs progress hledger
wineWowPackages.full
# graphical utils
kitty baobab
@@ -83,7 +55,7 @@ in
mercurial
# isabelle
isabelle.isabelle2022 (isabelle.mkEnv "isabelle-env" "fish")
- (import inputs.isabelle-utils {inherit pkgs naersk; }).isabat
+ isabat
(import inputs.traveltext { inherit pkgs; })
];
diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix
index 75e8cfc..bfc0175 100644
--- a/pkgs/overlay.nix
+++ b/pkgs/overlay.nix
@@ -14,7 +14,65 @@ self: super:
});
typst = self.callPackage ./typst.nix {
- craneLib = (inputs.crane.mkLib self).overrideToolchain
- self.rust-bin.stable.latest.default;
+ rust-bin =
+ self.rust-bin;
};
+
+ almanac = self.rustPlatform.buildRustPackage rec {
+ pname = "almanac";
+ version = "git";
+ src = inputs.almanac.outPath;
+ cargoLock.lockFile = "${src}/Cargo.lock";
+ };
+
+ kijetesantakaluotokieni = self.rustPlatform.buildRustPackage rec {
+ pname = "kijetesantakaluotokieni";
+ version = "git";
+ src = self.fetchgit {
+ url = "https://git.2ki.xyz/spiders/kijetesantakaluotokieni";
+ rev = "7d9ea828f42ffd9fb6826ea4cbf7677b08222064";
+ sha256 = "sha256-PEp+K5mRNUR6yWLrpGpiX8qvaPQIibA17NQwXUiC2lk=";
+ };
+ cargoLock.lockFile = "${src}/Cargo.lock";
+ };
+
+ showrt = self.rustPlatform.buildRustPackage rec {
+ pname = "showrt";
+ version = "git";
+ src = inputs.showrt;
+ nativeBuildInputs = [ self.protobuf ];
+ cargoLock.lockFile = "${src}/Cargo.lock";
+ };
+
+ isabelle-utils = self.rustPlatform.buildRustPackage rec {
+ pname = "isabelle-utils";
+ version = "git";
+ src = inputs.isabelle-utils;
+ cargoLock.lockFile = "${src}/Cargo.lock";
+ checkPhase = "
+ echo skipping tests
+ ";
+ };
+
+ isabat = import "${inputs.isabelle-utils}/isabat.nix" {
+ pkgs = self;
+ isabelle-rust-utils = self.isabelle-utils;
+ };
+
+ emacs29 = self.callPackage
+ (import "${inputs.nixpkgs.outPath}/pkgs/applications/editors/emacs/generic.nix" {
+ version = "29";
+ sha256 = "sha256-AI4eNgzRLnM1s4hQa0YWJxZR3WZoIuKy7BYosT06K1c=";
+ }) {
+ inherit (self.darwin.apple_sdk.frameworks) AppKit Carbon Cocoa IOKit OSAKit Quartz
+ QuartzCore WebKit ImageCaptureCore GSS ImageIO;
+ gconf = null;
+ alsa-lib = null;
+ gpm = null;
+ libXaw = self.xorg.libXaw;
+ inherit (self.darwin) sigtool;
+ withPgtk = true;
+ withX = false;
+ };
+
}
diff --git a/pkgs/typst.nix b/pkgs/typst.nix
index 0290899..597a81a 100644
--- a/pkgs/typst.nix
+++ b/pkgs/typst.nix
@@ -1,10 +1,22 @@
-{ craneLib, fetchFromGitHub, lib, git }:
+{ rustPlatform, fetchFromGitHub, lib, git, rust-bin, ... }:
-craneLib.buildPackage rec {
+rustPlatform.buildRustPackage rec {
pname = "typst-cli";
version = "22-03-21-2";
- cargoExtraArgs = "-p typst-cli";
+ cargoBuildFlags = "-p typst-cli";
+ cargoLock = {
+ lockFile = "${src}/Cargo.lock";
+ outputHashes = {
+ "biblatex-0.6.3" = "sha256-TfH2tk7B61HHqpdGY48TdPKelp4+78x+8LRFobAg8QA=";
+ "comemo-0.1.0" = "sha256-zg056kUc8sVLQ8vvT4uOuRJnyrCORsGYUvsjBJEkFPg=";
+ "hayagriva-0.1.1" = "sha256-HGQ+jNAnejxUBQNaqXPw57zfAC3qNXSWUVzDALZTXg0=";
+ "iai-0.1.1" = "sha256-EdNzCPht5chg7uF9O8CtPWR/bzSYyfYIXNdLltqdlR0=";
+ "lipsum-0.8.2" = "sha256-deIbpn4YM7/NeuJ5Co48ivJmxwrcsbLl6c3cP3JZxAQ=";
+ "pixglyph-0.1.0" = "sha256-8veNF3rzV21ayzk9gh2x0mQA8nHGM662ohvh084a0vk=";
+ "unicode-math-class-0.1.0" = "sha256-NkwDzj1SfUe570UcfotmVP6bIEYwiegZd0j8TPEWoOk=";
+ };
+ };
src = fetchFromGitHub {
owner = "typst";
repo = "typst";
@@ -14,5 +26,8 @@ craneLib.buildPackage rec {
};
# the build.rs script wants a version hash from git.
- buildInputs = [ git ];
+ nativeBuildInputs = [
+ git
+ rust-bin.stable.latest.minimal
+ ];
}