diff options
| -rw-r--r-- | default.nix | 43 | ||||
| -rw-r--r-- | flake.lock | 75 | ||||
| -rw-r--r-- | flake.nix | 36 | 
3 files changed, 111 insertions, 43 deletions
| diff --git a/default.nix b/default.nix deleted file mode 100644 index dc49456..0000000 --- a/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ mkDerivation, alsa-core, alsa-mixer, async, base, bytestring -, containers, dbus, directory, extensible-exceptions, filepath -, hinotify, hspec, http-conduit, http-types, iwlib, libmpd, libXpm -, libXrandr, libXrender, mtl, old-locale, parsec, parsec-numbers -, process, regex-compat, stdenv, stm, temporary, time -, timezone-olson, timezone-series, transformers, unix, utf8-string -, wirelesstools, X11, X11-xft -}: -mkDerivation { -  pname = "xmobar"; -  version = "0.29.5"; -  src = ./.; -  configureFlags = [ -    "-fwith_alsa" "-fwith_conduit" "-fwith_datezone" "-fwith_dbus" -    "-fwith_inotify" "-fwith_iwlib" "-fwith_mpd" "-fwith_mpris" -    "-fwith_rtsopts" "-fwith_threaded" "-fwith_utf8" "-fwith_uvmeter" -    "-fwith_weather" "-fwith_xft" "-fwith_xpm" -  ]; -  isLibrary = true; -  isExecutable = true; -  libraryHaskellDepends = [ -    alsa-core alsa-mixer async base bytestring containers dbus -    directory extensible-exceptions filepath hinotify http-conduit -    http-types iwlib libmpd mtl old-locale parsec parsec-numbers -    process regex-compat stm time timezone-olson timezone-series -    transformers unix utf8-string X11 X11-xft -  ]; -  librarySystemDepends = [ -    libXpm libXrandr libXrender wirelesstools -  ]; -  executableHaskellDepends = [ -    async base containers directory filepath parsec unix X11 -  ]; -  testHaskellDepends = [ -    alsa-core alsa-mixer async base bytestring containers directory -    filepath hspec mtl old-locale parsec parsec-numbers process -    regex-compat stm temporary time transformers unix X11 -  ]; -  doCheck = false; -  homepage = "https://github.com/jaor/xmobar"; -  description = "A Minimalistic Text Based Status Bar"; -  license = stdenv.lib.licenses.bsd3; -} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..e60d10e --- /dev/null +++ b/flake.lock @@ -0,0 +1,75 @@ +{ +  "nodes": { +    "flake-utils": { +      "locked": { +        "lastModified": 1653893745, +        "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", +        "owner": "numtide", +        "repo": "flake-utils", +        "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", +        "type": "github" +      }, +      "original": { +        "owner": "numtide", +        "repo": "flake-utils", +        "type": "github" +      } +    }, +    "git-ignore-nix": { +      "inputs": { +        "nixpkgs": "nixpkgs" +      }, +      "locked": { +        "lastModified": 1646480205, +        "narHash": "sha256-kekOlTlu45vuK2L9nq8iVN17V3sB0WWPqTTW3a2SQG0=", +        "owner": "hercules-ci", +        "repo": "gitignore.nix", +        "rev": "bff2832ec341cf30acb3a4d3e2e7f1f7b590116a", +        "type": "github" +      }, +      "original": { +        "owner": "hercules-ci", +        "ref": "master", +        "repo": "gitignore.nix", +        "type": "github" +      } +    }, +    "nixpkgs": { +      "locked": { +        "lastModified": 1632846328, +        "narHash": "sha256-sFi6YtlGK30TBB9o6CW7LG9mYHkgtKeWbSLAjjrNTX0=", +        "owner": "NixOS", +        "repo": "nixpkgs", +        "rev": "2b71ddd869ad592510553d09fe89c9709fa26b2b", +        "type": "github" +      }, +      "original": { +        "id": "nixpkgs", +        "type": "indirect" +      } +    }, +    "nixpkgs_2": { +      "locked": { +        "lastModified": 1654398695, +        "narHash": "sha256-Kw/KeoFXszNsF5mORP45mrxCP+k9Aq03hWcuWCL9sdI=", +        "owner": "NixOS", +        "repo": "nixpkgs", +        "rev": "c5d810f4c74c824ae0fb788103003c6c9d366a08", +        "type": "github" +      }, +      "original": { +        "id": "nixpkgs", +        "type": "indirect" +      } +    }, +    "root": { +      "inputs": { +        "flake-utils": "flake-utils", +        "git-ignore-nix": "git-ignore-nix", +        "nixpkgs": "nixpkgs_2" +      } +    } +  }, +  "root": "root", +  "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..0c79fad --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ +  inputs = { +    git-ignore-nix.url = "github:hercules-ci/gitignore.nix/master"; +    flake-utils.url = "github:numtide/flake-utils"; +  }; +  outputs = { self, nixpkgs, flake-utils, git-ignore-nix }: +    let +      overlay = final: prev: { +        haskellPackages = prev.haskellPackages.override (old: { +          overrides = prev.lib.composeExtensions (old.overrides or (_: _: { })) +            (hself: hsuper: { +              xmobar = hself.callCabal2nix "xmobar" +                (git-ignore-nix.lib.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.xmobar ]; +          buildInputs = with pkgs; [ +            xorg.libX11 +            xorg.libXrandr +            xorg.libXrender +            xorg.libXScrnSaver +            xorg.libXext +            xorg.libXft +          ]; +        }; +        defaultPackage = pkgs.haskellPackages.xmobar; +      }) // { +        inherit overlay overlays; +      }; +} | 
