mirror of
https://github.com/malob/prefmanager.git
synced 2024-12-14 11:57:49 +00:00
Update to GHC 9.0.2 and other cleanup
This commit is contained in:
parent
eb4f85f0fb
commit
d9aa23a926
7 changed files with 43 additions and 51 deletions
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
|
@ -10,12 +10,9 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v13
|
||||
uses: cachix/install-nix-action@v17
|
||||
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: Setup Cachix
|
||||
|
@ -26,9 +23,9 @@ jobs:
|
|||
|
||||
- name: Nix Flakes
|
||||
run: |
|
||||
nix --print-build-logs build .
|
||||
nix --print-build-logs run . -- --help
|
||||
nix --print-build-logs develop .
|
||||
nix -L build .
|
||||
nix -L run . -- --help
|
||||
nix -L develop .
|
||||
|
||||
- name: Nix Legacy
|
||||
run: |
|
||||
|
|
32
flake.lock
32
flake.lock
|
@ -1,12 +1,20 @@
|
|||
{
|
||||
"nodes": {
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1637575296,
|
||||
"narHash": "sha256-ZY8YR5u8aglZPe27+AJMnPTG6645WuavB+w0xmhTarw=",
|
||||
"lastModified": 1650900878,
|
||||
"narHash": "sha256-qhNncMBSa9STnhiLfELEQpYC1L4GrYHNIzyCZ/pilsI=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "0e56ef21ba1a717169953122c7415fa6a8cd2618",
|
||||
"rev": "d97df53b5ddaa1cfbea7cddbd207eb2634304733",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -18,11 +26,11 @@
|
|||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1627913399,
|
||||
"narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=",
|
||||
"lastModified": 1650374568,
|
||||
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2",
|
||||
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -33,11 +41,11 @@
|
|||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1638122382,
|
||||
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
|
||||
"lastModified": 1649676176,
|
||||
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
|
||||
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -48,11 +56,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1639118782,
|
||||
"narHash": "sha256-NwStPk1m8gWVhZkWpLYVsD/3EmLk+qRDxpxpEvAyBx8=",
|
||||
"lastModified": 1650970888,
|
||||
"narHash": "sha256-K0Qk6YbkyxBbszkBKCxsLA+jrQpaecf0X8iIO8frS48=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "47f45c8440e2ef1e967aa5aec3528dd976c4a488",
|
||||
"rev": "27a62a9c603d0d832141682cb4f34964d7b48ebb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
19
flake.nix
19
flake.nix
|
@ -7,24 +7,22 @@
|
|||
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
plist-source = { url = "github:malob/plist/monadfail"; flake = false; };
|
||||
devshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||
devshell.inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, devshell, nixpkgs, flake-utils, plist-source, ... }:
|
||||
flake-utils.lib.eachSystem [ "x86_64-darwin" "aarch64-darwin" ] (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
compiler = pkgs.haskell.packages.ghc8107;
|
||||
compiler = pkgs.haskell.packages.ghc902;
|
||||
hlib = pkgs.haskell.lib;
|
||||
plist = hlib.markUnbroken (hlib.overrideSrc compiler.plist { src = plist-source; });
|
||||
prefmanager = compiler.callCabal2nix "prefmanager" ./. { inherit plist; };
|
||||
mkShell = devshell.legacyPackages.${system}.mkShell;
|
||||
in rec {
|
||||
# Built by `nix build .`
|
||||
defaultPackage = prefmanager;
|
||||
packages.prefmanager = defaultPackage;
|
||||
|
||||
# Run `prefmanager` with `nix run .`
|
||||
defaultApp = { type = "app"; program = "${prefmanager}/bin/prefmanager"; };
|
||||
apps.prefmanager = defaultApp;
|
||||
packages.default = prefmanager;
|
||||
packages.prefmanager = prefmanager;
|
||||
|
||||
# # This is used by `nix develop .`
|
||||
devShell = mkShell {
|
||||
|
@ -33,7 +31,6 @@
|
|||
compiler.haskell-language-server
|
||||
compiler.implicit-hie
|
||||
compiler.weeder
|
||||
pkgs.cabal2nix
|
||||
pkgs.stack
|
||||
pkgs.hlint
|
||||
];
|
||||
|
@ -44,12 +41,6 @@
|
|||
category = "project";
|
||||
command = "gen-hie > hie.yaml";
|
||||
}
|
||||
{
|
||||
help = "Update prefmanager.nix (run from project root)";
|
||||
name = "2nix";
|
||||
category = "project";
|
||||
command = "cabal2nix --hpack . > prefmanager.nix";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ import Data.Text (stripEnd, splitOn)
|
|||
import Patience.Map (diff, isSame, toDelta)
|
||||
import Prettyprinter.Render.Terminal (putDoc)
|
||||
import System.Console.ANSI (clearLine, setCursorColumn)
|
||||
import System.IO (hFlush)
|
||||
import Text.XML.HXT.Core (no, withSubstDTDEntities, withValidate)
|
||||
import Text.XML.Plist (PlObject, fromPlDict, readPlistFromString)
|
||||
import System.Process.Typed (shell, readProcessStdout_)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
with import (import ./default.nix).inputs.nixpkgs {};
|
||||
haskell.lib.buildStackProject {
|
||||
ghc = haskell.compiler.ghc8107;
|
||||
ghc = haskell.compiler.ghc902;
|
||||
name = "prefmanager";
|
||||
}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
# GHC 8.10.7
|
||||
resolver: lts-18.12
|
||||
|
||||
packages:
|
||||
- .
|
||||
resolver: lts-19.5
|
||||
|
||||
extra-deps:
|
||||
- patience-0.3
|
||||
|
|
|
@ -5,33 +5,33 @@
|
|||
|
||||
packages:
|
||||
- completed:
|
||||
hackage: patience-0.3@sha256:fe3a2c5b1ac4d3425bad3d1ee0b6bb529b6e74ab41151f8526f26fc8dfa1206b,1252
|
||||
pantry-tree:
|
||||
size: 368
|
||||
sha256: d2ca47451a599605c641b7c353588d7e1ba3d6036c8a52040b7d1b5b1af8959b
|
||||
size: 368
|
||||
hackage: patience-0.3@sha256:fe3a2c5b1ac4d3425bad3d1ee0b6bb529b6e74ab41151f8526f26fc8dfa1206b,1252
|
||||
original:
|
||||
hackage: patience-0.3
|
||||
- completed:
|
||||
hackage: base-noprelude-4.13.0.0@sha256:3cccbfda38e1422ca5cc436d58858ba51ff9114d2ed87915a6569be11e4e5a90,6842
|
||||
pantry-tree:
|
||||
size: 112
|
||||
sha256: 90db92c8401880187ce642c5345407bcbd9546ea235524dd445cab2566ee3db1
|
||||
size: 112
|
||||
hackage: base-noprelude-4.13.0.0@sha256:3cccbfda38e1422ca5cc436d58858ba51ff9114d2ed87915a6569be11e4e5a90,6842
|
||||
original:
|
||||
hackage: base-noprelude-4.13.0.0
|
||||
- completed:
|
||||
sha256: 7943778b77d008b8e529035d8a4d42c537ede9efe3d24900eb0d855b4567a892
|
||||
name: plist
|
||||
size: 4351
|
||||
url: https://github.com/malob/plist/archive/5e22be0933bf9a100868b944fa7a8b1236b99255.tar.gz
|
||||
name: plist
|
||||
version: 0.0.6
|
||||
sha256: 7943778b77d008b8e529035d8a4d42c537ede9efe3d24900eb0d855b4567a892
|
||||
pantry-tree:
|
||||
size: 512
|
||||
sha256: 4872e51ef6ab654c99e06f286635fe1c977e165bc38f77c6bfb402e9fbff0559
|
||||
size: 512
|
||||
version: 0.0.6
|
||||
original:
|
||||
url: https://github.com/malob/plist/archive/5e22be0933bf9a100868b944fa7a8b1236b99255.tar.gz
|
||||
snapshots:
|
||||
- completed:
|
||||
size: 586041
|
||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/12.yaml
|
||||
sha256: 80fc6391195ff00c36f2a605ecbb07de909bfaa2eaa9722a27e486a6ecf8ecb0
|
||||
original: lts-18.12
|
||||
sha256: b936d27d647a31a8834d3efec126e2a07dee9c9bd6dd401d9bdac77e7b278f1e
|
||||
size: 619093
|
||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/5.yaml
|
||||
original: lts-19.5
|
||||
|
|
Loading…
Reference in a new issue