Skip to content

Commit

Permalink
feat(pkgs/to-haskell-overlay/iCalendar): add it
Browse files Browse the repository at this point in the history
  • Loading branch information
wrvsrx committed Apr 13, 2024
1 parent 3c559b4 commit 15667ff
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 34 deletions.
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
pkgs-to-flat-packages
pkgs-to-python-modules
pkgs-to-vim-plugins
pkgs-to-haskell-overlay
;
templates = import ./templates;
in
Expand Down Expand Up @@ -86,6 +87,7 @@
pkgs-to-flat-packages pkgs
// {
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ (pkgs-to-python-modules pkgs) ];
haskellPackages = prev.haskellPackages.extend (pkgs-to-haskell-overlay prev);
vimPlugins = prev.vimPlugins // (pkgs-to-vim-plugins pkgs);
};
};
Expand Down
6 changes: 5 additions & 1 deletion pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ let
to-override-packages = import ./to-override-packages;
to-sources = import ./to-sources;
to-python-modules = import ./to-python-modules;
to-haskell-overlay = import ./to-haskell-overlay;
to-vim-plugins = import ./to-vim-plugins;
pkgs-to-python-modules = pkgs: to-python-modules { inherit pkgs to-sources; };
pkgs-to-haskell-overlay = pkgs: to-haskell-overlay { inherit pkgs to-sources; };
pkgs-to-normal-packages = pkgs: to-normal-packages { inherit pkgs to-sources; };
pkgs-to-override-packages = pkgs: to-override-packages { inherit pkgs to-sources; };
pkgs-to-flat-packages =
Expand Down Expand Up @@ -36,9 +38,10 @@ let
googletrans
;
};
haskell-packages = (pkgs-to-haskell-overlay pkgs { } pkgs.haskellPackages);
vim-plugins = pkgs-to-vim-plugins pkgs;
in
flat-packages // python-packages // vim-plugins;
flat-packages // python-packages // vim-plugins // haskell-packages;
pkgs-to-vim-plugins = pkgs: to-vim-plugins { inherit pkgs to-sources; };
in
{
Expand All @@ -47,5 +50,6 @@ in
pkgs-to-flat-packages
pkgs-to-python-modules
pkgs-to-vim-plugins
pkgs-to-haskell-overlay
;
}
38 changes: 38 additions & 0 deletions pkgs/to-haskell-overlay/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ pkgs, to-sources }:
final: prev:
let
sources = to-sources { inherit pkgs; };
inherit (prev) callPackage;
callIFD = import ../callIFD.nix;
in
rec {
iCalendar =
(pkgs.haskell.lib.overrideSrc prev.iCalendar {
src = pkgs.fetchFromGitHub {
owner = "wrvsrx";
repo = "iCalendar";
rev = "e2f5f700294ae0d205b6bf2e372f3a99f801d7fc";
hash = "sha256-e2aZr8Vh/HJnTV8GwIDMzGTZBZdYf72NtapHElHw0gg=";
};
}).overrideAttrs
(old: {
meta = old.meta // {
broken = false;
};
});
osc52 = callIFD {
inherit callPackage;
source = sources.osc52;
};
taskwarrior-utils = callIFD {
inherit callPackage;
source = sources.taskwarrior-utils;
};
calendar-visualization = callIFD {
inherit callPackage;
source = sources.calendar-visualization;
otherArgs = {
inherit iCalendar;
};
};
}
12 changes: 0 additions & 12 deletions pkgs/to-normal-packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,4 @@ rec {
height = 2160;
};
};
osc52 = callIFD {
inherit (haskellPackages) callPackage;
source = sources.osc52;
};
taskwarrior-utils = callIFD {
inherit (haskellPackages) callPackage;
source = sources.taskwarrior-utils;
};
calendar-visualization = callIFD {
inherit (haskellPackages) callPackage;
source = sources.calendar-visualization;
};
}
6 changes: 4 additions & 2 deletions pkgs/to-normal-packages/metacubexd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ let
buildPhase = ''
mkdir cache
export XDG_CACHE_HOME=$PWD/cache
bun install --frozen-lockfile --verbose --production --ignore-scripts
# bun's update breaks `bun.lockb` sometimes
bun install --verbose --ignore-scripts
'';
installPhase = "cp -r cache $out";
outputHash = "sha256-xuFQajgU+W/k6NIYKuV9AQAGX3OkU0h5SBr+KT1zBi0=";
Expand All @@ -55,7 +56,8 @@ let
cp -r ${node_modules_cache} cache
export XDG_CACHE_HOME=$PWD/cache
chmod +w $PWD/cache/.bun/install/cache
bun install --frozen-lockfile --verbose --production
# bun's update breaks `bun.lockb` sometimes
bun install --verbose
bun run build
'';
installPhase = "cp -r dist $out";
Expand Down
4 changes: 0 additions & 4 deletions pkgs/to-override-packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,4 @@ in
source = sources.xclip;
};
lyra = callPackage ./lyra { source = sources.lyra; };
spdlog = callPackage ./spdlog {
inherit (pkgs) spdlog;
source = sources.spdlog;
};
}
6 changes: 0 additions & 6 deletions pkgs/to-override-packages/spdlog/default.nix

This file was deleted.

0 comments on commit 15667ff

Please sign in to comment.