mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-04 22:21:56 -07:00
Merge branch 'add-nix-flake'
This commit is contained in:
25
.github/workflows/nix.yml
vendored
Normal file
25
.github/workflows/nix.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Nix
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Nix Flake - Linux
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- name: Install Nix
|
||||||
|
uses: cachix/install-nix-action@v13
|
||||||
|
with:
|
||||||
|
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
|
||||||
|
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
|
||||||
|
extra_nix_config: |
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Clone project
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Build
|
||||||
|
run: nix build
|
27
flake.nix
Normal file
27
flake.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# This file is maintained by @IvanMalison (github)
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
flake-utils.url = github:numtide/flake-utils;
|
||||||
|
git-ignore-nix.url = github:IvanMalison/gitignore.nix/master;
|
||||||
|
};
|
||||||
|
outputs = { self, flake-utils, nixpkgs, git-ignore-nix }:
|
||||||
|
let
|
||||||
|
overlay = final: prev: {
|
||||||
|
haskellPackages = prev.haskellPackages.override (old: {
|
||||||
|
overrides = prev.lib.composeExtensions (old.overrides or (_: _: {}))
|
||||||
|
(hself: hsuper: {
|
||||||
|
xmonad = hself.callCabal2nix "xmonad" (git-ignore-nix.gitIgnoreSource ./.) { };
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
overlays = [ overlay ];
|
||||||
|
in flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let pkgs = import nixpkgs { inherit system overlays; };
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
devShell = pkgs.haskellPackages.shellFor {
|
||||||
|
packages = p: [ p.xmonad ];
|
||||||
|
};
|
||||||
|
defaultPackage = pkgs.haskellPackages.xmonad;
|
||||||
|
}) // { inherit overlay overlays; } ;
|
||||||
|
}
|
Reference in New Issue
Block a user