Compare commits
16 Commits
main
...
nixos-25.0
Author | SHA1 | Date |
---|---|---|
|
de53bfd455 | |
|
f71602bcff | |
|
1557fcbf00 | |
|
b157a5ca31 | |
|
83be7c5296 | |
|
d181eac6a3 | |
|
c1bd5b32d6 | |
|
76cbd04361 | |
|
6933e33e80 | |
|
9c6a46b398 | |
|
b33745acb8 | |
|
71af6415d2 | |
|
37050f846b | |
|
6223d67e8f | |
|
8674b22d5c | |
|
946bbc1522 |
28
flake.lock
28
flake.lock
|
@ -3,43 +3,43 @@
|
||||||
"lix": {
|
"lix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737234286,
|
"lastModified": 1751235704,
|
||||||
"narHash": "sha256-CCKIAE84dzkrnlxJCKFyffAxP3yfsOAbdvydUGqq24g=",
|
"narHash": "sha256-J4ycLoXHPsoBoQtEXFCelL4xlq5pT8U9tNWNKm43+YI=",
|
||||||
"rev": "2837da71ec1588c1187d2e554719b15904a46c8b",
|
"rev": "22be6ff62626c8cdbb9cdb59a3e4bd910fedd0d6",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/2837da71ec1588c1187d2e554719b15904a46c8b.tar.gz?rev=2837da71ec1588c1187d2e554719b15904a46c8b"
|
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/22be6ff62626c8cdbb9cdb59a3e4bd910fedd0d6.tar.gz?rev=22be6ff62626c8cdbb9cdb59a3e4bd910fedd0d6"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://git.lix.systems/lix-project/lix/archive/2.92.0.tar.gz"
|
"url": "https://git.lix.systems/lix-project/lix/archive/2.93.2.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lix-module": {
|
"lix-module": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742943028,
|
"lastModified": 1751240025,
|
||||||
"narHash": "sha256-fprwZKE1uMzO9tiWWOrmLWBW3GPkMayQfb0xOvVFIno=",
|
"narHash": "sha256-SXUAlxpjPRkArRMHy5+Hdi+PiC+ND9yzzIjiaHmTvQU=",
|
||||||
"rev": "868d97695bab9d21f6070b03957bcace249fbe3c",
|
"rev": "8b1094356f4723d6e89d3f8a95b333ee16d9ab02",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/868d97695bab9d21f6070b03957bcace249fbe3c.tar.gz?rev=868d97695bab9d21f6070b03957bcace249fbe3c"
|
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/8b1094356f4723d6e89d3f8a95b333ee16d9ab02.tar.gz?rev=8b1094356f4723d6e89d3f8a95b333ee16d9ab02"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-3.tar.gz"
|
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748370509,
|
"lastModified": 1751741127,
|
||||||
"narHash": "sha256-QlL8slIgc16W5UaI3w7xHQEP+Qmv/6vSNTpoZrrSlbk=",
|
"narHash": "sha256-t75Shs76NgxjZSgvvZZ9qOmz5zuBE8buUaYD28BMTxg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "4faa5f5321320e49a78ae7848582f684d64783e9",
|
"rev": "29e290002bfff26af1db6f64d070698019460302",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-25.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
103
flake.nix
103
flake.nix
|
@ -2,15 +2,15 @@
|
||||||
description = "dragnpkgs together with nixpkgs and lix";
|
description = "dragnpkgs together with nixpkgs and lix";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||||
|
|
||||||
lix-module = {
|
lix-module = {
|
||||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-3.tar.gz";
|
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
lix = {
|
lix = {
|
||||||
url = "https://git.lix.systems/lix-project/lix/archive/2.92.0.tar.gz";
|
url = "https://git.lix.systems/lix-project/lix/archive/2.93.2.tar.gz";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -22,6 +22,10 @@
|
||||||
(import "${lix-module}/overlay.nix" { inherit lix; })
|
(import "${lix-module}/overlay.nix" { inherit lix; })
|
||||||
];
|
];
|
||||||
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
|
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
|
||||||
|
libVersionInfoOverlay = import "${nixpkgs}/lib/flake-version-info.nix" nixpkgs;
|
||||||
|
# this is taken from upstream. if upstream changes, the code here needs to be updated to match
|
||||||
|
addLibVersionInfo = lib: lib.extend libVersionInfoOverlay;
|
||||||
|
lib-base = addLibVersionInfo (import "${nixpkgs}/lib");
|
||||||
in {
|
in {
|
||||||
# we don't just use nix.registry.whatever.flake = self
|
# we don't just use nix.registry.whatever.flake = self
|
||||||
# the reason for this is to be able to handle a flake.lock containing an entry for this
|
# the reason for this is to be able to handle a flake.lock containing an entry for this
|
||||||
|
@ -29,21 +33,54 @@
|
||||||
# self reference in the registry to be downloadable by URL in case it makes it into a
|
# self reference in the registry to be downloadable by URL in case it makes it into a
|
||||||
# flake.lock
|
# flake.lock
|
||||||
meta.registry-entry = {
|
meta.registry-entry = {
|
||||||
from = { id = "dragnpkgs-unstable"; type = "indirect"; };
|
from = { id = "dragnpkgs"; type = "indirect"; };
|
||||||
to = {
|
to = {
|
||||||
type = "git";
|
type = "git";
|
||||||
url = "https://git.lain.faith/haskal/dragnpkgs.git";
|
url = "https://git.lain.faith/haskal/dragnpkgs.git";
|
||||||
ref = "main";
|
ref = "nixos-25.05";
|
||||||
} // self.lib.filterAttrs
|
} // self.lib.filterAttrs
|
||||||
(n: _: n == "lastModified" || n == "rev" || n == "revCount" || n == "narHash")
|
(n: _: n == "lastModified" || n == "rev" || n == "revCount" || n == "narHash")
|
||||||
self;
|
self;
|
||||||
};
|
};
|
||||||
|
|
||||||
# the nix path entry for self
|
# the nix path entry for self
|
||||||
meta.path-entry = "dragnpkgs-unstable=flake:dragnpkgs-unstable";
|
meta.path-entry = "dragnpkgs=flake:dragnpkgs";
|
||||||
|
|
||||||
lib = nixpkgs.lib.extend (final: prev: {
|
lib = (lib-base.extend (import ./lib/overlay.nix)).extend (final: prev: {
|
||||||
licenses = prev.licenses // { fyptl = import ./lib/licenses/fyptl.nix; };
|
# initializes regular upstream nixpkgs with the given arguments
|
||||||
|
nixpkgs-custom = { system, ... } @ args: (
|
||||||
|
(import "${nixpkgs}" args).extend (final: prev: {
|
||||||
|
lib = addLibVersionInfo prev.lib;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
# initializes dragnpkgs with its overlays and default config using the given arguments
|
||||||
|
dragnpkgs-custom = { system, ... } @ args: let
|
||||||
|
unsafeConf = if builtins.hasAttr "extraBuiltins" builtins then (
|
||||||
|
let conf = builtins.extraBuiltins; in
|
||||||
|
if builtins.isAttrs conf then conf else {}
|
||||||
|
) else {};
|
||||||
|
possiblyCommitCrimes =
|
||||||
|
if
|
||||||
|
builtins.hasAttr "dragnpkgs" unsafeConf &&
|
||||||
|
builtins.isAttrs unsafeConf.dragnpkgs &&
|
||||||
|
builtins.hasAttr "possiblyCommitCrimes" unsafeConf.dragnpkgs &&
|
||||||
|
builtins.isBool unsafeConf.dragnpkgs.possiblyCommitCrimes
|
||||||
|
then
|
||||||
|
unsafeConf.dragnpkgs.possiblyCommitCrimes
|
||||||
|
else
|
||||||
|
false;
|
||||||
|
in
|
||||||
|
final.nixpkgs-custom (args // {
|
||||||
|
overlays = overlays ++ (args.overlays or []);
|
||||||
|
config = (args.config or {}) // {
|
||||||
|
allowlistedLicenses = (final.optionals
|
||||||
|
possiblyCommitCrimes
|
||||||
|
[ final.licenses.fyptl ]) ++ (args.config.allowlistedLicenses or []);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
nixos = import "${nixpkgs}/nixos/lib" { lib = final; };
|
||||||
|
|
||||||
nixosSystem = args:
|
nixosSystem = args:
|
||||||
import "${nixpkgs}/nixos/lib/eval-config.nix" (
|
import "${nixpkgs}/nixos/lib/eval-config.nix" (
|
||||||
|
@ -122,17 +159,17 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config.nix.registry.dragnpkgs-unstable =
|
config.nix.registry.dragnpkgs =
|
||||||
lib.mkIf config.dragnpkgs.setFlakeRegistry self.meta.registry-entry;
|
lib.mkIf config.dragnpkgs.setFlakeRegistry self.meta.registry-entry;
|
||||||
|
|
||||||
config.nix.registry.nixpkgs = lib.mkIf config.dragnpkgs.setNixpkgsFlakeAlias {
|
config.nix.registry.nixpkgs = lib.mkIf config.dragnpkgs.setNixpkgsFlakeAlias {
|
||||||
from = { id = "nixpkgs"; type = "indirect"; };
|
from = { id = "nixpkgs"; type = "indirect"; };
|
||||||
to = { id = "dragnpkgs-unstable"; type = "indirect"; };
|
to = { id = "dragnpkgs"; type = "indirect"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
config.nix.registry.templates = lib.mkIf config.dragnpkgs.setTemplatesFlakeAlias {
|
config.nix.registry.templates = lib.mkIf config.dragnpkgs.setTemplatesFlakeAlias {
|
||||||
from = { id = "templates"; type = "indirect"; };
|
from = { id = "templates"; type = "indirect"; };
|
||||||
to = { id = "dragnpkgs-unstable"; type = "indirect"; };
|
to = { id = "dragnpkgs"; type = "indirect"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
config.nix.nixPath = lib.mkIf config.dragnpkgs.setNixPath [
|
config.nix.nixPath = lib.mkIf config.dragnpkgs.setNixPath [
|
||||||
|
@ -153,8 +190,8 @@
|
||||||
lib.mkForce "/etc/nix/extra-builtins.nix"
|
lib.mkForce "/etc/nix/extra-builtins.nix"
|
||||||
);
|
);
|
||||||
|
|
||||||
config.environment.etc."nix/extra-builtins.nix".text =
|
config.environment.etc = lib.mkIf config.dragnpkgs.possiblyCommitCrimes {
|
||||||
lib.mkIf config.dragnpkgs.possiblyCommitCrimes (
|
"nix/extra-builtins.nix".text =
|
||||||
let
|
let
|
||||||
possiblyCommitCrimes =
|
possiblyCommitCrimes =
|
||||||
lib.boolToString config.dragnpkgs.possiblyCommitCrimes;
|
lib.boolToString config.dragnpkgs.possiblyCommitCrimes;
|
||||||
|
@ -164,7 +201,8 @@
|
||||||
possiblyCommitCrimes = ${possiblyCommitCrimes};
|
possiblyCommitCrimes = ${possiblyCommitCrimes};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
'');
|
'';
|
||||||
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
(import ./module.nix)
|
(import ./module.nix)
|
||||||
|
@ -184,7 +222,8 @@
|
||||||
));
|
));
|
||||||
in
|
in
|
||||||
builtins.mapAttrs (name: value:
|
builtins.mapAttrs (name: value:
|
||||||
if name == "packages" || name == "legacyPackages" || name == "devShells" then
|
if name == "packages" || name == "legacyPackages" || name == "devShells" ||
|
||||||
|
name == "apps" then
|
||||||
rewritePerSystem value
|
rewritePerSystem value
|
||||||
else
|
else
|
||||||
value
|
value
|
||||||
|
@ -192,41 +231,19 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
legacyPackages = forAllSystems (system:
|
legacyPackages = forAllSystems (system:
|
||||||
let
|
self.lib.dragnpkgs-custom { inherit system; }
|
||||||
unsafeConf = if builtins.hasAttr "extraBuiltins" builtins then (
|
|
||||||
let conf = builtins.extraBuiltins; in
|
|
||||||
if builtins.isAttrs conf then conf else {}
|
|
||||||
) else {};
|
|
||||||
possiblyCommitCrimes =
|
|
||||||
if
|
|
||||||
builtins.hasAttr "dragnpkgs" unsafeConf &&
|
|
||||||
builtins.isAttrs unsafeConf.dragnpkgs &&
|
|
||||||
builtins.hasAttr "possiblyCommitCrimes" unsafeConf.dragnpkgs &&
|
|
||||||
builtins.isBool unsafeConf.dragnpkgs.possiblyCommitCrimes
|
|
||||||
then
|
|
||||||
unsafeConf.dragnpkgs.possiblyCommitCrimes
|
|
||||||
else
|
|
||||||
false;
|
|
||||||
in
|
|
||||||
nixpkgs.legacyPackages.${system}.appendOverlays (overlays ++
|
|
||||||
[(final: prev: {
|
|
||||||
stdenv = prev.stdenv.override {
|
|
||||||
config = prev.config // {
|
|
||||||
allowlistedLicenses = final.lib.optionals
|
|
||||||
possiblyCommitCrimes
|
|
||||||
[ final.lib.licenses.fyptl ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})])
|
|
||||||
);
|
);
|
||||||
|
|
||||||
nixosModules = nixpkgs.nixosModules;
|
|
||||||
|
|
||||||
templates = {
|
templates = {
|
||||||
default = {
|
default = {
|
||||||
path = ./templates/default;
|
path = ./templates/default;
|
||||||
description = "A very basic flake (with dragnpkgs)";
|
description = "A very basic flake (with dragnpkgs)";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
beamer = {
|
||||||
|
path = ./templates/beamer;
|
||||||
|
description = "A very basic presentation with Beamer";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultTemplate = self.templates.default;
|
defaultTemplate = self.templates.default;
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
final: prev: {
|
||||||
|
licenses = prev.licenses // { fyptl = import ./licenses/fyptl.nix; };
|
||||||
|
}
|
|
@ -8,7 +8,7 @@
|
||||||
# set some nix settings defaults
|
# set some nix settings defaults
|
||||||
config.nix.settings = {
|
config.nix.settings = {
|
||||||
repl-overlays = [ ./repl-overlay.nix ];
|
repl-overlays = [ ./repl-overlay.nix ];
|
||||||
experimental-features = "nix-command flakes repl-flake pipe-operator";
|
experimental-features = "nix-command flakes pipe-operator";
|
||||||
temp-dir = "/var/tmp";
|
temp-dir = "/var/tmp";
|
||||||
|
|
||||||
# we're disabling the default flake registry because i don't like it
|
# we're disabling the default flake registry because i don't like it
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
final: prev: {
|
final: prev: {
|
||||||
lib = prev.lib.extend (lfinal: lprev: {
|
lib = prev.lib.extend (import ./lib/overlay.nix);
|
||||||
licenses = lprev.licenses // { fyptl = import ./lib/licenses/fyptl.nix; };
|
|
||||||
});
|
|
||||||
|
|
||||||
fetchFromSteam = prev.callPackage ./lib/fetchsteam {};
|
fetchFromSteam = prev.callPackage ./lib/fetchsteam {};
|
||||||
fetchb4 = prev.callPackage ./lib/fetchb4 {};
|
fetchb4 = prev.callPackage ./lib/fetchb4 {};
|
||||||
|
@ -58,4 +56,8 @@ final: prev: {
|
||||||
pympress = prev.pympress.overrideDerivation (oldAttrs: {
|
pympress = prev.pympress.overrideDerivation (oldAttrs: {
|
||||||
patches = [ ./pkgs/python/pympress/0001-Fix-KDE-window-icon.patch ];
|
patches = [ ./pkgs/python/pympress/0001-Fix-KDE-window-icon.patch ];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
texliveDragonPackages = {
|
||||||
|
moloch = prev.callPackage ./pkgs/tex/moloch {};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
From 10a24d7831f51549d8c05193a0fbc329cc327fbe Mon Sep 17 00:00:00 2001
|
From d9e022548aff94e90914baa921ddb4cd939c0e5c Mon Sep 17 00:00:00 2001
|
||||||
From: xenia <xenia@awoo.systems>
|
From: xenia <xenia@awoo.systems>
|
||||||
Date: Sat, 21 Dec 2024 15:33:10 -0500
|
Date: Sat, 21 Dec 2024 15:33:10 -0500
|
||||||
Subject: [PATCH] implement lix support
|
Subject: [PATCH] implement lix support
|
||||||
|
|
||||||
---
|
---
|
||||||
CMakeLists.txt | 27 -------------
|
CMakeLists.txt | 27 ------------
|
||||||
extra-builtins.cc | 87 ++++++++++++++++-------------------------
|
extra-builtins.cc | 91 ++++++++++++++++-------------------------
|
||||||
meson.build | 18 +++++++++
|
meson.build | 18 ++++++++
|
||||||
nix-plugins-config.h.in | 3 --
|
nix-plugins-config.h.in | 3 --
|
||||||
4 files changed, 51 insertions(+), 84 deletions(-)
|
4 files changed, 53 insertions(+), 86 deletions(-)
|
||||||
delete mode 100644 CMakeLists.txt
|
delete mode 100644 CMakeLists.txt
|
||||||
create mode 100644 meson.build
|
create mode 100644 meson.build
|
||||||
delete mode 100644 nix-plugins-config.h.in
|
delete mode 100644 nix-plugins-config.h.in
|
||||||
|
@ -47,7 +47,7 @@ index 9674fe8..0000000
|
||||||
-
|
-
|
||||||
-install(TARGETS nix-extra-builtins DESTINATION lib/nix/plugins)
|
-install(TARGETS nix-extra-builtins DESTINATION lib/nix/plugins)
|
||||||
diff --git a/extra-builtins.cc b/extra-builtins.cc
|
diff --git a/extra-builtins.cc b/extra-builtins.cc
|
||||||
index 3a0f90e..f2978f8 100644
|
index 3a0f90e..95aef5e 100644
|
||||||
--- a/extra-builtins.cc
|
--- a/extra-builtins.cc
|
||||||
+++ b/extra-builtins.cc
|
+++ b/extra-builtins.cc
|
||||||
@@ -1,12 +1,8 @@
|
@@ -1,12 +1,8 @@
|
||||||
|
@ -68,8 +68,12 @@ index 3a0f90e..f2978f8 100644
|
||||||
|
|
||||||
using namespace nix;
|
using namespace nix;
|
||||||
|
|
||||||
@@ -24,39 +20,38 @@ static GlobalConfig::Register rp(&extraBuiltinsSettings);
|
@@ -21,42 +17,41 @@ static ExtraBuiltinsSettings extraBuiltinsSettings;
|
||||||
static void extraBuiltins(EvalState & state, const PosIdx pos,
|
|
||||||
|
static GlobalConfig::Register rp(&extraBuiltinsSettings);
|
||||||
|
|
||||||
|
-static void extraBuiltins(EvalState & state, const PosIdx pos,
|
||||||
|
+static void extraBuiltins(EvalState & state,
|
||||||
Value ** _args, Value & v)
|
Value ** _args, Value & v)
|
||||||
{
|
{
|
||||||
- static auto extraBuiltinsFile = state.rootPath(CanonPath(extraBuiltinsSettings.extraBuiltinsFile.to_string()));
|
- static auto extraBuiltinsFile = state.rootPath(CanonPath(extraBuiltinsSettings.extraBuiltinsFile.to_string()));
|
||||||
|
@ -130,8 +134,9 @@ index 3a0f90e..f2978f8 100644
|
||||||
+ Value* arg = state.ctx.mem.allocValue();
|
+ Value* arg = state.ctx.mem.allocValue();
|
||||||
+ arg->mkAttrs(attrs);
|
+ arg->mkAttrs(attrs);
|
||||||
v.mkApp(fun, arg);
|
v.mkApp(fun, arg);
|
||||||
state.forceValue(v, pos);
|
- state.forceValue(v, pos);
|
||||||
- } catch (FileNotFound &) {
|
- } catch (FileNotFound &) {
|
||||||
|
+ state.forceValue(v, noPos);
|
||||||
+ } catch (SysError &) {
|
+ } catch (SysError &) {
|
||||||
v.mkNull();
|
v.mkNull();
|
||||||
}
|
}
|
||||||
|
@ -190,5 +195,5 @@ index 459fea8..0000000
|
||||||
-#define NIX_CFLAGS_OTHER "@NIX_CFLAGS_OTHER@"
|
-#define NIX_CFLAGS_OTHER "@NIX_CFLAGS_OTHER@"
|
||||||
-#define BOOST_INCLUDE_DIR "@BOOST_INCLUDE_DIR@"
|
-#define BOOST_INCLUDE_DIR "@BOOST_INCLUDE_DIR@"
|
||||||
--
|
--
|
||||||
2.47.2
|
2.49.0
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
lix
|
lix
|
||||||
boost182
|
boost182
|
||||||
|
(lix.capnproto-lix)
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
hash = "sha256-orvXNhM1WKlJ6j5Nuap0kZarydcujoEmF+OrdX7iFmA=";
|
hash = "sha256-orvXNhM1WKlJ6j5Nuap0kZarydcujoEmF+OrdX7iFmA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoHash = "sha256-7/SP+drJWg2c4bsd3d4ge8E9BJZykbWfjgC2lSJhqas=";
|
cargoHash = "sha256-m8lXHfj6W/qltK+WrT0rE0gDNvvhghcXkeiX3Slx9X8=";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A firmware base address search tool";
|
description = "A firmware base address search tool";
|
||||||
|
|
|
@ -0,0 +1,94 @@
|
||||||
|
{
|
||||||
|
fetchFromGitea,
|
||||||
|
writeShellScript,
|
||||||
|
writableTmpDirAsHomeHook,
|
||||||
|
|
||||||
|
stdenvNoCC,
|
||||||
|
|
||||||
|
texlivePackages,
|
||||||
|
texliveBasic,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
texEnv = texliveBasic.withPackages (ps: with ps; [
|
||||||
|
# l3build
|
||||||
|
beamer
|
||||||
|
biblatex
|
||||||
|
enumitem
|
||||||
|
fileinfo
|
||||||
|
hypdoc
|
||||||
|
hyperref
|
||||||
|
listings
|
||||||
|
metalogo
|
||||||
|
parskip
|
||||||
|
pgf
|
||||||
|
pgfopts
|
||||||
|
setspace
|
||||||
|
xurl
|
||||||
|
microtype
|
||||||
|
|
||||||
|
latexmk
|
||||||
|
]);
|
||||||
|
in stdenvNoCC.mkDerivation rec {
|
||||||
|
pname = "moloch";
|
||||||
|
version = "1.0.2-DEV-xenia";
|
||||||
|
|
||||||
|
outputs = [
|
||||||
|
"tex"
|
||||||
|
"texdoc"
|
||||||
|
];
|
||||||
|
|
||||||
|
passthru.tlDeps = with texlivePackages; [ latex ];
|
||||||
|
|
||||||
|
src = fetchFromGitea {
|
||||||
|
domain = "git.lain.faith";
|
||||||
|
owner = "haskal";
|
||||||
|
repo = "${pname}-dragon";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-eMlhJj4a2HTDhDzkS9KR+d76lt81iH7x//WZOA39tno=";
|
||||||
|
};
|
||||||
|
|
||||||
|
dontConfigure = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
texEnv
|
||||||
|
|
||||||
|
# multiple-outputs.sh fails if $out is not defined
|
||||||
|
(writeShellScript "force-tex-output.sh" ''
|
||||||
|
out="''${tex-}"
|
||||||
|
'')
|
||||||
|
|
||||||
|
writableTmpDirAsHomeHook # Need a writable $HOME for latexmk
|
||||||
|
];
|
||||||
|
|
||||||
|
# we just build manually, but moloch's own method of building is using l3build
|
||||||
|
# i have no idea how to get that working, so for now just do it normal style
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
|
# Generate the style files
|
||||||
|
cd src
|
||||||
|
latex beamertheme${pname}.ins
|
||||||
|
|
||||||
|
# Generate the documentation
|
||||||
|
cp ../doc/${pname}.tex .
|
||||||
|
latexmk -pdf ${pname}.tex
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
path="$tex/tex/latex/${pname}"
|
||||||
|
mkdir -p "$path"
|
||||||
|
cp src/*.{cls,def,clo,sty} "$path/"
|
||||||
|
|
||||||
|
path="$texdoc/doc/tex/latex/${pname}"
|
||||||
|
mkdir -p "$path"
|
||||||
|
cp src/${pname}.pdf "$path/"
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
|
@ -0,0 +1,16 @@
|
||||||
|
/my-beamer-presentation.pdf
|
||||||
|
|
||||||
|
*.aux
|
||||||
|
*.fdb_latexmk
|
||||||
|
*.fls
|
||||||
|
*.log
|
||||||
|
*.nav
|
||||||
|
*.out
|
||||||
|
*.snm
|
||||||
|
*.synctex.gz
|
||||||
|
*.toc
|
||||||
|
|
||||||
|
result
|
||||||
|
result-tex
|
||||||
|
|
||||||
|
.direnv
|
|
@ -0,0 +1,46 @@
|
||||||
|
{
|
||||||
|
description = "A very basic presentation with Beamer";
|
||||||
|
|
||||||
|
outputs = { self, dragnpkgs } @ inputs: dragnpkgs.lib.mkFlake {
|
||||||
|
# Define a texlive environment to use
|
||||||
|
packages.texlive-custom = { texliveMedium, texliveDragonPackages }:
|
||||||
|
texliveMedium.withPackages (ps: with ps; [
|
||||||
|
fontawesome5
|
||||||
|
texliveDragonPackages.moloch
|
||||||
|
]);
|
||||||
|
|
||||||
|
# Package definition for building the PDF
|
||||||
|
packages.default = { system, stdenvNoCC }: stdenvNoCC.mkDerivation rec {
|
||||||
|
pname = "my-beamer-presentation";
|
||||||
|
|
||||||
|
name = "${pname}.pdf";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
self.packages.${system}.texlive-custom
|
||||||
|
];
|
||||||
|
|
||||||
|
src = self;
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
latexmk -pdf ${pname}.tex
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
cp ${pname}.pdf $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Runnable package (ie `nix run`) to start the presentation
|
||||||
|
apps.default = { lib, system, writeShellScript, pympress }: {
|
||||||
|
type = "app";
|
||||||
|
program = "${writeShellScript "start-presentation" ''
|
||||||
|
exec ${lib.getExe pympress} ${self.packages.${system}.default}
|
||||||
|
''}";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Devshell definition to expose the texlive environment to eg nvim
|
||||||
|
devShells.default = { mkShell, system }: mkShell {
|
||||||
|
packages = [ self.packages.${system}.texlive-custom ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,93 @@
|
||||||
|
\documentclass[aspectratio=169]{beamer}
|
||||||
|
\usepackage[english]{babel}
|
||||||
|
\usepackage{fontawesome5}
|
||||||
|
\usepackage{tikz}
|
||||||
|
\usetikzlibrary{arrows,calc,fit,positioning}
|
||||||
|
|
||||||
|
|
||||||
|
\usetheme{moloch}
|
||||||
|
\usefonttheme[onlymath]{serif}
|
||||||
|
|
||||||
|
|
||||||
|
% this can be commented out to produce a slide deck with no notes
|
||||||
|
\setbeameroption{show notes}
|
||||||
|
|
||||||
|
|
||||||
|
% useful tikz styles from previous slide decks
|
||||||
|
\tikzset{%
|
||||||
|
icon/.value required,
|
||||||
|
icon/.style={%
|
||||||
|
node contents={\faIcon{#1}},
|
||||||
|
icon size=normal,
|
||||||
|
},
|
||||||
|
icon size/.is choice,
|
||||||
|
icon size/.default=normal,
|
||||||
|
icon size/normal/.style={%
|
||||||
|
font={\fontsize{20.74}{20.74}\selectfont}
|
||||||
|
},
|
||||||
|
icon size/small/.style={%
|
||||||
|
font={\fontsize{12}{12}\selectfont}
|
||||||
|
},
|
||||||
|
rounded box/.style={%
|
||||||
|
inner sep=0.3em,
|
||||||
|
draw,
|
||||||
|
rounded corners,
|
||||||
|
line width=0.1em
|
||||||
|
},
|
||||||
|
sequence diagram/.style={%
|
||||||
|
font=\small,
|
||||||
|
line width=1pt,
|
||||||
|
sequence/.style={%
|
||||||
|
every to/.style={%
|
||||||
|
to path={(\tikztostart) -- (\tikztostart -| \tikztotarget) \tikztonodes} % chktex 1 chktex 8
|
||||||
|
},
|
||||||
|
->/.style={-stealth,every node/.style={above}},
|
||||||
|
<-/.style={stealth-,every node/.style={below}},
|
||||||
|
},
|
||||||
|
note/.style={%
|
||||||
|
color=example text.fg,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
\title{My Beamer Presentation}
|
||||||
|
\subtitle{(From the template)}
|
||||||
|
\author{You}
|
||||||
|
\institute{Institute of Swag Nix Templates}
|
||||||
|
\date{Now}
|
||||||
|
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\maketitle
|
||||||
|
|
||||||
|
\section{My Section}
|
||||||
|
\subsection{My Subsection}
|
||||||
|
|
||||||
|
\begin{frame}
|
||||||
|
\frametitle{Some Slide Title}
|
||||||
|
|
||||||
|
Sample text
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
|
\begin{frame}
|
||||||
|
\frametitle{Some Other Slide Title}
|
||||||
|
|
||||||
|
Sample text 2
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
|
|
||||||
|
\appendix
|
||||||
|
|
||||||
|
\begin{frame}[standout]
|
||||||
|
Backup Slides
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
|
\begin{frame}
|
||||||
|
\frametitle{Backup slide 1}
|
||||||
|
|
||||||
|
Some backup slide content
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
|
\end{document}
|
Loading…
Reference in New Issue