Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qbar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Nolte
qbar
Commits
bd895e40
Commit
bd895e40
authored
1 year ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Update flake.nix, update nixpkgs and add quasar dependency
parent
9135e39f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
default.nix
+0
-8
0 additions, 8 deletions
default.nix
flake.lock
+44
-7
44 additions, 7 deletions
flake.lock
flake.nix
+50
-27
50 additions, 27 deletions
flake.nix
qbar.cabal
+3
-33
3 additions, 33 deletions
qbar.cabal
src/QBar/Utils.hs
+1
-1
1 addition, 1 deletion
src/QBar/Utils.hs
with
98 additions
and
76 deletions
default.nix
deleted
100644 → 0
+
0
−
8
View file @
9135e39f
{
pkgs
?
import
<
nixpkgs
>
{},
haskellPackages
?
pkgs
.
haskellPackages
,
args
?
{}
}:
let
rawdrv
=
haskellPackages
.
callCabal2nix
"qbar"
./.
args
;
drv
=
pkgs
.
haskell
.
lib
.
generateOptparseApplicativeCompletions
[
"qbar"
]
rawdrv
;
in
if
pkgs
.
lib
.
inNixShell
then
rawdrv
.
env
else
drv
This diff is collapsed.
Click to expand it.
flake.lock
+
44
−
7
View file @
bd895e40
...
...
@@ -2,21 +2,58 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 16
48486164
,
"narHash": "sha256-
v2EOpYJkFS+L4TFoBWC1ZTKYm6FsNNIGyWraY5MtO+4
=",
"owner": "
n
ix
os
",
"lastModified": 16
81303793
,
"narHash": "sha256-
JEdQHsYuCfRL2PICHlOiH/2ue3DwoxUX7DJ6zZxZXFk
=",
"owner": "
N
ix
OS
",
"repo": "nixpkgs",
"rev": "
1be57bee8d0565a7bfd8745540fed257c8c7f523
",
"rev": "
fe2ecaf706a5907b5e54d979fbde4924d84b65fc
",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1681303793,
"narHash": "sha256-JEdQHsYuCfRL2PICHlOiH/2ue3DwoxUX7DJ6zZxZXFk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fe2ecaf706a5907b5e54d979fbde4924d84b65fc",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"quasar": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1682474992,
"narHash": "sha256-tyN64/4weIGmlYMOOrVwFaBVyqvt8du9APhCO9vkV14=",
"owner": "queezle42",
"repo": "quasar",
"rev": "76faa881ae2e3a5575fba9f9e374931dbb8e6495",
"type": "github"
},
"original": {
"owner": "queezle42",
"repo": "quasar",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"quasar": "quasar"
}
}
},
...
...
This diff is collapsed.
Click to expand it.
flake.nix
+
50
−
27
View file @
bd895e40
{
outputs
=
{
self
,
nixpkgs
}:
with
nixpkgs
.
lib
;
let
inputs
=
{
nixpkgs
.
url
=
github
:
NixOS/nixpkgs/nixos-unstable
;
quasar
.
url
=
github
:
queezle42/quasar
;
};
outputs
=
{
self
,
nixpkgs
,
quasar
}:
with
nixpkgs
.
lib
;
let
systems
=
platforms
.
unix
;
forAllSystems
=
f
:
genAttrs
systems
(
system
:
f
system
);
forAllSystems
=
genAttrs
systems
;
getHaskellPackages
=
pkgs
:
pattern
:
pipe
pkgs
.
haskell
.
packages
[
attrNames
(
filter
(
x
:
!
isNull
(
strings
.
match
pattern
x
)))
(
sort
(
x
:
y
:
x
>
y
))
(
map
(
x
:
pkgs
.
haskell
.
packages
.
${
x
}))
head
];
in
{
packages
=
forAllSystems
(
system
:
let
pkgs
=
import
nixpkgs
{
inherit
system
;
overlays
=
[
self
.
overlay
];
};
in
rec
{
default
=
qbar
;
qbar
=
pkgs
.
haskellPackages
.
qbar
;
let
pkgs
=
import
nixpkgs
{
inherit
system
;
overlays
=
[
self
.
overlays
.
default
quasar
.
overlays
.
default
];
};
haskellPackages
=
getHaskellPackages
pkgs
"ghc94."
;
results
=
{
qbar
=
haskellPackages
.
qbar
;
};
in
results
//
{
default
=
pkgs
.
linkFarm
"qbar-all"
(
results
//
mapAttrs
'
(
k
:
v
:
nameValuePair
"
${
k
}
-doc"
(
v
.
doc
or
pkgs
.
emptyDirectory
))
results
);
}
);
defaultPackage
=
forAllSystems
(
system
:
self
.
packages
.
${
system
}
.
qbar
);
overlay
=
final
:
prev
:
{
overlays
.
default
=
final
:
prev
:
{
haskell
=
prev
.
haskell
//
{
packageOverrides
=
hfinal
:
hprev
:
prev
.
haskell
.
packageOverrides
hfinal
hprev
//
{
qbar
=
import
./.
{
pkgs
=
final
;
haskellPackages
=
hfinal
;
};
qbar
=
hfinal
.
generateOptparseApplicativeCompletions
[
"qbar"
]
(
hfinal
.
callCabal2nix
"qbar"
./.
{});
};
};
};
devShell
=
forAllSystems
(
system
:
devShell
s
=
forAllSystems
(
system
:
let
pkgs
=
nixpkgs
.
legacyPackages
.
${
system
};
in
pkgs
.
mkShell
{
inputsFrom
=
[
self
.
packages
.
${
system
}
.
default
.
env
];
packages
=
[
pkgs
.
cabal-install
pkgs
.
zsh
pkgs
.
entr
pkgs
.
ghcid
pkgs
.
haskell-language-server
];
pkgs
=
import
nixpkgs
{
inherit
system
;
overlays
=
[
self
.
overlays
.
default
quasar
.
overlays
.
default
];
};
haskellPackages
=
getHaskellPackages
pkgs
"ghc94."
;
in
rec
{
default
=
haskellPackages
.
shellFor
{
packages
=
hpkgs
:
[
hpkgs
.
qbar
];
nativeBuildInputs
=
[
pkgs
.
cabal-install
pkgs
.
zsh
pkgs
.
entr
pkgs
.
ghcid
haskellPackages
.
haskell-language-server
pkgs
.
hlint
];
};
}
);
};
}
This diff is collapsed.
Click to expand it.
qbar.cabal
+
3
−
33
View file @
bd895e40
...
...
@@ -102,6 +102,8 @@ library
pipes-network,
pipes-parse,
pipes-safe,
quasar,
quasar-timer,
random,
sorted-list,
stm,
...
...
@@ -151,39 +153,7 @@ executable qbar
hs-source-dirs:
app
build-depends:
aeson,
async,
attoparsec,
base >=4.7 && <5,
binary,
bytestring,
colour,
concurrent-extra,
containers,
dbus,
directory,
filepath,
gitrev,
hostname,
lens,
mtl,
network,
optparse-applicative,
pipes,
pipes-aeson,
pipes-concurrency,
pipes-network,
pipes-parse,
pipes-safe,
qbar,
random,
sorted-list,
stm,
text,
time,
typed-process,
unix,
unordered-containers,
test-suite qbar-test
import: shared-executable-properties
...
...
@@ -195,4 +165,4 @@ test-suite qbar-test
test
build-depends:
base >=4.7 && <5,
qbar,
\ No newline at end of file
qbar,
This diff is collapsed.
Click to expand it.
src/QBar/Utils.hs
+
1
−
1
View file @
bd895e40
...
...
@@ -7,7 +7,7 @@ import Control.Concurrent.STM (atomically)
import
Control.Concurrent.STM.TChan
import
Control.Concurrent.STM.TVar
import
Control.Monad
(
replicateM
)
import
qualified
Data.Text.Lazy
as
T
import
Data.Text.Lazy
qualified
as
T
import
Pipes
import
System.Random
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment